Chapter 01 - How to make warning go away

Hi All,

I am trying to train the model for fist chapter pets.
I see this warning -
/usr/local/lib/python3.6/dist-packages/torch/nn/ UserWarning: The default behavior for interpolate/upsample with float scale_factor will change in 1.6.0 to align with other frameworks/libraries, and use scale_factor directly, instead of relying on the computed output size. If you wish to keep the old behavior, please set recompute_scale_factor=True.

What can be done about this without ignoring the warning?

Thanks in advance,

i see that on colab about a thousand times when i’m fitting; some kind of version clash.

i have to downgrade my pytorch version at the top of the notebook. try this.

!pip install torch==1.4.0 torchvision==0.5.0
1 Like

The issue itself hasn’t been fixed yet, check here:

1 Like

ok, github noob question, once that gets merged into master will

!curl -s | bash

get me the new version? (that does a pip install fastai --upgrade).
i assume the master branch gets regularly pushed to wherever pip installs happen from?

1 Like

Regularly, sometimes. Also known as whenever they decide to make a release. Right now it’s been a few months (to keep the first version somewhere so when people go to try the book everything works OOTB). To install the most recent versions you must do:

!pip install git+
!pip install git+

Also known as a dev install. And do note, that fastai2 and fastcore must both be installed this way otherwise you will run into trouble


Super thanks… Will try this