Resnet 18 in "is it a bird" and why not restnet26d or others?

Hi everyone,
In Jeremy’s notebook “is it a bird” , if I put resnet26d instead of resnet18,it gives an error. Why this happen? Why I can’t put another model?

Jeremy’s code:

learn = vision_learner(dls, resnet18, metrics=error_rate)
learn.fine_tune(10)

My code:

learn = vision_learner(dls, resnet26d, metrics=error_rate)
learn.fine_tune(10)

Error:

resnet26d is not define

I might be wrong on this, but fastai out of the box doesn’t provide a ton of models to be used. (This is at least a partial list, though I couldn’t find something like this in the docs, so maybe there are others.)

For using lots of different models, your best bet is to use timm in conjunction with fastai, described in the docs. Maybe resnet26d is in there? This explains how to list the available models.

I’d also recommend you check out this notebook which will give you some intuition for what you might consider using as alternatives to resnet. For example, it seems that the convnext family do pretty well for image classification.

3 Likes

Thank You very much!
It has helped me a lot

1 Like