Python Library/TensorFlow
how to off Learning_phase for dropout and batch_norm when export .pb
hellobird
2019. 8. 18. 16:48
2
Most probably the problem is related to running environment.
There are some variables which are being computed in training phase for future use.
If you don't change to test phase, it will use current values.
For example dropout and batch normalization.
If you use it in training mode, then for mean and variance it will use current values,
but in test time it will use moving_mean and moving_variance.
That's why you should call
import keras.backend as K
k.set_learning_phase(0) # 0 testing, 1 training modeTry this one. It can help to understand the difference.