C3W3. Could someone help me improve my model to get mean iou>=0.6?

I spent 2 days and tried to do anything but my best score mean iou was 58.8, does anyone have some tips?

There can be many places where things could possibly go wrong. Assuming the model is built as suggested by the exercises. Are you training the model for enough epochs? Perhaps if you train for further more epochs, maybe the score improves.

If the score doesn’t improve, even after you train for many books, decades of epochs, then there is something wrong with your model.

1 Like

Hi. I suggest looking at the first two ungraded labs this week to see if there is any code there that you can refer to or reuse. However, please also be mindful of the markdown and code comments in the assignment itself because that will also guide you to the correct solution.

As Gent also mentioned, another approach is to train the model longer. After getting your initial IOU score (before the Save the model section) and it fails, you can try re-running exercise 5 with a few epochs and check if the loss is still decreasing. Then re-run the next cells to see the new IOU score. Hope this helps.

1 Like

I built the model correctly according to the assignment’s suggestions, but it only scored about 0.35 IOU after 100 epochs. Then I tried changing the interpolation of the upsampling layers to bilinear, adding a conv2d layer for f4 and f3 with n filters, kernel_size(1,1), and then adding the conv2d layer n_classes, size(1,1). It improved, but only to about 0.58. I tried increasing the number of filters in the blocks, but it didn’t seem to improve anything and only wasted time. I tried different learning rates and even tried replacing the upsampling layer with conv2dtranspose, but nothing improved. I trained everything with 100 epochs.

In the model that got 0.58, try rerunning exercise 5 with a few more epochs (maybe just 20). That might get you over the 0.6 threshold.