Resnet34 model: AttributeError: function object has no attribute 'children'

1 Like

Hi @gsg,

I was able to successfully create the model body you are looking for by instantiating the model class like this: create_body(resnet34(), cut=-2)

Additionally, I had to use from fastai.vision.all import * instead of just importing fastai (the top level library)

Hope this helps!

1 Like

I have a similar issue however I tried the solution and I still get the same error.

replace resnet34 with resnet34()

1 Like

Sorry for the late reply, such a noob mistake, I can’t believe that I forgot to type the ().

Thanks for the answer