Can't import frozen graph with BatchNorm layer

前端 未结 3 1667
-上瘾入骨i
-上瘾入骨i 2021-02-20 13:41

I have trained a Keras model based on this repo.

After the training I save the model as checkpoint files like this:

 sess=tf.keras.backend.get_session(         


        
3条回答
  •  无人及你
    2021-02-20 13:48

    Thanks for pointing the main issue! I found that keras.backend.set_learning_phase(0) to be not working sometimes, at least in my case.

    Another approach might be: for l in keras_model.layers: l.trainable = False

提交回复
热议问题