Error on learn.predict() after fastai update: ‘Conv2d’ object has no attribute ‘padding_mode’

Hello fellows,

I had a model perfectly working before last fastai code update. Now when I call learn.predict() I am getting the following error:
AttributeError: ‘Conv2d’ object has no attribute ‘padding_mode’

Anyone knows how to fix this problem?

2 Likes

!pip install --upgrade fastai torch==1.0.0

worked for me.

3 Likes

Thanks for this, it helped me out. I had this same error when I deployed a model on google app engine. I noticed a discrepancy in the torch version on the virtual machine where I built the model (1.0.1) and the version on the app (1.1.0).

Eventually solved it by upgrading to torch 1.1.0 on the machine where I built the model (it didn’t work the other way around).

1 Like

It doesn’t worked for me . Any other suggestion?

OK ı repaired it. I downgrade Pytorch to version 1.0.1 thanks a lot

2 Likes

pip install --upgrade fastai torch==1.0.0 It’s work for me . Thank u for this.

1 Like