C1_W4_Lab_2 Notebook should be updated to work

Using the current training ‘step_per_epoch = 8’ will give you an error. I found that reducing the to ‘6’ instead of ‘8’ fixes the issue. I think this is due to the limited number of images being generated.

Please check your setup based on this output about train / val sets:

Found 1027 images belonging to 2 classes.
Found 256 images belonging to 2 classes.

Training set has 1027 images. 8 batches of 128 images will cover 1024 images.
Validation set has 256 images. 8 batches of 32 images will cover 256 images.

So, there should be no need for reducing steps_per_epoch in the notebook.

Here’s proof of successful training on colab just now:

My setup is correct and the output was the same as you presented; however, when I used Colab, I am only able to get errors when using a value of 8.

Please try with a fresh copy of the notebook from here.
If things go wrong, click my name and message the notebook as an attachment.

Thanks. This version worked, as well as the visualization worked too.

Thanks for confirming. Is there another version of the notebook?

I do not know if there is another version. The only difference was that I ran out of GPU today and used CPU instead. I did decide to upgrade so I was able to do my other lab today with GPU computes. Yesterday, it just would not work, no matter what I tried, unless I reduced the steps. The visualization would not work on both labs as well, but they worked today, and I was very happy to be able to see it in action.