New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch normalization: loss increased when deepxde.maps.map.Map.training set to False #69
Comments
By the way, #68 does used |
The code of |
|
net = ...
net.apply_feature_transform(lambda X: tf.concat([X[:, 0:1] / a, X[:, 0:1] / b)], axis=1)) |
Hi Lu, I see. Thank you for you reply. I will temporarily close this issue since I also did not spot anything wrong with the code of batch normalization. |
The issue still exists when using Lines 17 to 47 in f8ab0b0
|
Yes, "L-BFGS-B" does not work with "batch_normalization", because "L-BFGS-B" is from scipy. But the TensorFlow optimizers should work. |
I am not sure whether it makes sense to use batch-norm, because here we want to compute the derivatives |
Hi Lu, I see, I agree with you that one should be careful when using batch normalization is such case. Thank you for your reply! |
Hi Lu,
I am trying
deepxde.maps.fnn.FNN.batch_normalization
atdeepxde/deepxde/maps/fnn.py
Line 27 in 8e811ad
And I noticed that when
deepxde/deepxde/model.py
Line 253 in 8e811ad
deepxde/deepxde/model.py
Line 243 in 8e811ad
To reproduce, here are two scripts comparing with each other:
without
batch_normalization
, it givesto compare, if I add
batch_normalization
the output is
notice that at
step = 2484
the loss increased three order of magnitude.I am guessing that
mean
andstandard deviation
from training is either not properly stored or not properly reused when testing. Any idea? Thanks!The text was updated successfully, but these errors were encountered: