ResNet34 pretrained=False TypeError

Hi everyone,
I’m trying to do the semantic segmentation of custom 256x256x3 images. I used lesson 3 camvid code.
When I use pretrained resnet34 it works perfectly however when I want to train resnet from scratch on same dataset it produces an error:

learn = unet_learner(data, models.resnet34(pretrained=False), metrics=metrics, wd=wd)
TypeError: conv2d(): argument ‘input’ (position 1) must be Tensor, not bool

How to solve this?

Pretrained is a seperate parameter in the call. So unet_learner(data, models.resnet34, pretrained=False)

1 Like

It works. Thank you.