C3W1_Assignment model efficiency very poor


For Course 3 Week 1 assignment about object detection, I’m stick with a very poor model prediction with results:
Number of predictions where iou > threshold(0.5): 1
Number of predictions where iou < threshold(0.5): 499

A barely 0.2% rate of iou > threshold.

Bounding boxes are predicted always in upper left corner:

The model loss (both training and validation doesn’t die down across epochs) as evident in the graph:

Validation loss pretty much hovers around ~ 0.0845…

However, looking at the assignment guidelines, I don’t think there is any other parameter than the batch size, that we can play with (I’m using the proper loss and optimizer along with their respective suggested arguments.

I’ve seen other threads on this topic where suggestions have been given to use LearningSchedule with SGD, but that didn’t work either (anyways, it shouldn’t be needed ideally, going by the guidelines).

I’m not sure what else can be tried.
Any help is more than welcome.


From the images it seems to me the model is not learning anything right, are you building it properly, the feature extractor and other parts…

If I was you I would reset it all and go in it from beginning followin all advices properly.

1 Like

Hi Indranil,

Is really difficult to guess what the problem can be.

Just some points to check,

are you using the weights “imagenet” ?
Double check the EXERCISE 6. be sure to calculate the steps_per_epochmad other variables correctly.

Sometimes is difficult to identify a problem, try to start again from a fresh copy of the notebook.

And if nothing works, feel free to send-me the notebook, i will try to revise it and see if I can identify the problem.


Hi Indranil,

I know you have been stuck in this assignment for long. The last two courses of this specialisation are mind-bending. Although one thing I have noticed for this assignment, for every grader cell before the exercise cell hints are given which are pretty straight forward and I used the ungraded lab to do the correction. If you still are running into this issue, you can share your notebook via personal DM. Click on my name and then message. Will have a look.


I went through the steps and tallied them with the guidelines and the model summary output matches the expected output. I hope, the model is constructed right. In the steps to compile, I’ve used the same optimizer and loss with the suggested params.

Yes, I’m using imagenet weights (it seems to be the default anyways with MobileNetV2), but I’ve explicitly specified as an argument.

In Exercise 6, I checked the variables, I’m setting the lengths as instructed. For steps_per_epoch, I’ve followed the 2nd alternative (i.e. to use //, followed by an if check on % result - in fact, I’ve followed the calculation that has been done for validation_steps)

1 Like

Hello Indranil,

Get the steps per epoch has incorrect code.

You have used activation softmax for bounding box regression output which need to be removed.

If your issue is resolved, let us know.

P.S I would sincerely suggest you to do Course of such assignments from your personal systems as you told you have some restrictions in using google drive for it is office system.

This assignment requires you to be connected to your google drive account, or you will keep having trouble for the next assignments too.


Thanks to pointers from @Deepti_Prasad, I recognized my mistake of using wrong activation for bb regression output. Once rectified, rest was easy. I was finally able to complete the assignment.