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 mode
Try this one. It can help to understand the difference.
'Python Library > TensorFlow' 카테고리의 다른 글
How To Convert Keras Model To .Pb format Example (0) | 2019.08.18 |
---|---|
Colab Tensorboard API (0) | 2019.08.18 |
How to Freeze Variables to Export keras model as .pb - 2 (0) | 2019.08.18 |
How to Freeze Variables to Export keras model as .pb - 1 (0) | 2019.08.18 |
tf.graph_util.convert_variables_to_constants 예제 (0) | 2019.08.14 |