When i run this code on my own dataset, and use the Adam optimizer, errors occured like this "Attempting to use uninitialized value Adam/lr". I can't figure out since the initialization is not necessary in keras. So I add this code before "model.fit()", and no errors happens.
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
But, this line would overwrite the weights from imagenet. Can anyone have ideas about the issue?
Environment keras 2.2.5 tensorflow 1.14.0
When i run this code on my own dataset, and use the Adam optimizer, errors occured like this "Attempting to use uninitialized value Adam/lr". I can't figure out since the initialization is not necessary in keras. So I add this code before "model.fit()", and no errors happens.
with tf.Session() as sess: sess.run(tf.global_variables_initializer())
But, this line would overwrite the weights from imagenet. Can anyone have ideas about the issue?