Keras replacing input layer

前端 未结 6 2118
清酒与你
清酒与你 2020-11-30 07:29

The code that I have (that I can\'t change) uses the Resnet with my_input_tensor as the input_tensor.

model1 = keras.applications.resnet50.ResNe         


        
6条回答
  •  孤城傲影
    2020-11-30 08:11

    Unfortunately kerassurgeon did not support my model as I had frozen layers. I had to make a small change to @MilindDeore's solution - replace model.layers.pop(0) to model._layers.pop(0) and it worked for me. Note that I am using tf.keras in TF 2.0.

提交回复
热议问题