MrGiovanni / UNetPlusPlus

[IEEE TMI] Official Implementation for UNet++
Other
2.26k stars 538 forks source link

Attempting to use uninitialized value Adam/lr #30

Open lauraset opened 4 years ago

lauraset commented 4 years ago

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?