C3W2_Assignment zombie detector - shape error

Hello, I have a problem and I can not find the solution in the zombie detector assignment.

After defining the checkpoints I try to “run a prediction with the preprocessed image and shapes” (Exercise 7 ) but I get this error :
ValueError: Received incompatible tensor with shape (1, 1, 2048, 512) when attempting to restore variable with shape (3, 3, 256, 256) and name conv4_block9_2_conv/kernel:0.

I dont understand because the shapes in my config file look correct, and my tensor for the dummy image used in the prediction is shaped [1, 640, 640, 3]
image

I suspesct something wrong in the checkpoint definitions but I double-checked and everything seems fine to me

Anyone has the same issue as me and kind enough to help me?

Thank you! Have a good day!

1 Like

Hello @MADivernois

Could you share a screenshot of the complete error here.

Regards
DP

Hello, thank you for your prompt response!

Sure. please see below. it happens when i run this code:
tmp_prediction_dict = detection_model.predict(tmp_image, tmp_shapes)

Thanks and best regards

Can you share what was the output of the Restore Checkpoint path?

Next check if your tmp_model_checkpoint is correctly recalled.

Next check if in exercise 5.1 Locate and read from the configuration file, the path to the .config file for ssd resnet 50 v1 640x640 is defined correctly

the defining path should be ‘/content/models/research/object_detection/configs/tf2/ssd_resnet50_v1_fpn_640x640_coco17_tpu-8.config’

Let me know if you didn’t resolve the issue, you can DM me your notebook with name as MADivernois Copy of assignment. Click on my name and then message. Do not post codes on the public post thread, it is against community guidelines.

Regards
DP

Thank you! that solved my issue. The problem is that my path was not correct (i was loading another resnet…

best regards

1 Like