Open mohamedabdallah1996 opened 3 years ago
I faced the same problem when I trying to build a model with transfer learning as your case and I trying to access the layers inside the inner model. The inner model is signed as "Functional" if you check model.summary()
.
Try to don't leave default value layer_name=None
into constructor of GradCAMCallback and put the last convolutional layer of your model: "conv5_3"
I face this error after putting
GradCAMCallback
in the fit function. I don't understand why this happens because it raises this error after training one epoch. if the graph is disconnected I think the model will be broken and it won't be able to finish even one epoch.this is my code:
full error message:
ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 224, 224, 3), dtype=tf.float32, name='input_10'), name='input_10', description="created by layer 'input_10'") at layer "conv1_1". The following previous layers were accessed without issue: ['conv1_1', 'conv1_1']