Bear classifier tutorial. Adding more bears?

In the official tutorial on classifying bears, there are 3 options ["teddy", "brown", "grizzly"] .

Now I finished the tutorial, but I want to add another bear polar . But I am unsure whether I need to:

A. Create a folder named polar add in the images and re-run the whole classifier from the start.


B. How I can add that other classification (retrain?) my model with the new polar bear whilst keeping the other bears.

The issue I can see with A only comes when you have to train on huge data sets, currently its quick and easy for me to just retrain the whole model, but that won’t be the case with a huge dataset.

1 Like

Hi robo hope your having a wonderful day!

I searched this forum for the string below and seems it is possible.

“how to add classes to a pretr”

It seems to involve saving pretrained weights, freezing the network and adding the new classes and then continuing the training. Similar to the transfer learning we do when we use the Resnet model.

I haven’t done it personally but can see a need in the future for one of my solutions.

Would be great to see your final solution.

Cheers mrfabulous1 :smiley: :smiley:

@mrfabulous1 the same technique we used for custom transfer learning in the WWF2 efficient net lesson can be applied here, for a hint :wink: (and the function doesn’t change v1 to v2)

Said notebook: focus on when later it discusses custom weights and transfer learning


Hey, @robo probably a year late but were you able to get the B done? If yes, may I request to share the notebook?