C3W2_Assignment_Zombie_detector - Shape Mismatch and Loss error

I am trying to finish the Colab for week 2 of Advanced Computer Vision with TensorFlow, but I cant see how to solve. The shape of some variables are different from expected and thus the loss does not decrease properly. Anybody could help me?

This error can happen if your preprocess data is incorrect per se go back to previous cell from starting where you could have done mistakes related to shape. Check in the configuration path codes.

Also can you share the image where it gives detail about your error without sharing your codes.


The problem is that there is no error msg

Hello Tiago,

Notice the below statement.
Please pass in a dummy image to create the trainable variables."

so in your model, check if your images are of the correct shape.

if unable to get this issue resolved. Kindly send a download notebook ipynb with your name as Tiago copy via personal DM. Click on my name and then message.


I just did it, I think it is the possible root cause of the problem. I will send it

Hello Tiago,

Corrections required in your file

  1. Under the below heading
    define the path (string) for each image
    You are suppose to write the code based on the below instructions
    os.path.join(‘parent_folder’, ‘file_name’ + str(1) + ‘.txt’)

notice the str(1), after zombie add this {str(i)}.jpg

  1. your Exercise 4: Download checkpoints, code cells where you download SSD resent 50 as well the decompress tar file and copy checkpoint codes are incorrect. Kindly refer the hints to do those corrections.

  2. in exercise 5. Configure the model, your resent shows resnet152 but the correct one is this

  3. In exercise 5.2, under the heading
    Read in the object stored at the key ‘model’ of the configs dictionary
    your model_config codes need the below correction
    configs.get(‘model’) you mentioned it has configs(model)

  4. tmp_box_predictor_checkpoint (this code minor space error)

  5. Under exercise Restore checkpoint, codes are incorrect for checkpoint_path and Restore the checkpoint to the checkpoint path. for the restore step what you have written codes kindly remove this part .expect_partial()

Let me know once your issue is resolved. Also as per the DM discussion remove those extra cell you added at the begginning. these assignment are suppose to be followed as per instructions anything added outside of ##START your code here and ###end your code here will cause your grade failure.


It worked, thank you very much for your help!

The variables to fine tune were also wrong, but I could figure that out by myself. Thanks a lot.

1 Like