GradCAM disconnection

I was implementing GradCAM for my resnet50 model, but I am getting an error which I am not able to solve.

ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 224, 224, 3), dtype=tf.float32, name=‘input_2’), name=‘input_2’, description=“created by layer ‘input_2’”) at layer “conv1_pad”. The following previous layers were accessed without issue: []

Hi @Iram_Kamdar ,

Welcome to TensorFlow Forum

Could be please share the Standalone code to reproduce the issue .

Thank you !