Going forward after ImageCleanup (Lesson 2)

I’m working on Lesson 2, following along with the videos. The current lesson2-download notebook is different than the one covered in the class recording, so I have some questions.

After cleaning up using `ImageCleaner()’ my understanding is that the deletion and re-labeling has not occurred on the original downloaded dataset. Rather, a new .CSV file is created that outlines these changes.

So I went to the docs to find out how to make a data bunch from csv:

cleaned_data = ImageDataBunch.from_csv(path, csv_labels='cleaned.csv', ds_tfms=get_transforms(), size=224).normalize(imagenet_stats)

Then I created a new learner:

learner_cln = cnn_learner(cleaned_data, models.resnet34, metrics=error_rate)
learner_cln.load('stage-1')
learner_cln.unfreeze()
learner_cln.fit_one_cycle(4, max_lr=slice(1e-3, 1e-1))

resulting in very bad error when I began training again:

epoch train_loss valid_loss error_rate time
0 4.679137 1474541.000000 0.804688 01:14
1 4.246964 445326.031250 0.890625 01:14
2 3.991158 2795.947754 0.796875 01:14
3 3.548282 44.752438 0.648438 01:14

So, did I misunderstand how to do this part? The directions are very vague in the new lesson notebook, so I figure I just don’t know what I’m doing.

Try this one

learner_cln = cnn_learner(cleaned_data, models.resnet34, metrics=error_rate)
learner_cln.load(‘stage-1’)
learner_cln.unfreeze()
learner_cln.fit_one_cycle(4, max_lr=slice(1e-3, 1e-1))

Hey @Harvey, I did catch that mistake already. (accidentally using my old learner).

Fixing it had no effect :confused: