Lesson 1 - Notebook stuck in create_cnn

Solved using this thread’s advice/information!
Thanks @rohitgeo, @dalohr, @imrandude, @nubonics, @peter_zacho and everyone else for sharing your experiences.

Downgrading from Pytorch 1.0.1 to Pytorch 1.0.0 was my solution/workaround.

My specific situation:
Tried to use conda (I wanted to confirm if using wheel was necessary)

conda install pytorch=1.0.0 torchvision cudatoolkit=10.0 -c pytorch

But it wanted to use Cuda 9, and i didn’t look into specifying that with conda.

The following packages will be DOWNGRADED:
pytorch 1.0.1-py3.7_cuda100_cudnn7_1 --> 1.0.0-py3.7_cuda90_cudnn7_1

So downloaded the .whl i needed. Python 3.7, Cuda 10, Windows 10 from https://pytorch.org/get-started/previous-versions/ and installed with pip.
PS: If you are using a virtual env, don’t forget to activate it before using pip!

Thanks again, I can finally work offline!

Thanks to this thread. I was also facing this issue and fixed by downgrading pytorch to 1.0.0 version.

So is the cause of the freeze due to a bug in PyTorch 1.0.1 or an issue with FastAI that hasn’t adapted to the new PyTorch iteration?

Breaking changes:

  • create_cnn becomes cnn_learner
  • random_split_by_pct becomes split_by_rand_pct
  • no_split becomes split_none
1 Like

Thank’s :pray:

Hi everyone,

I still getting the error when executing this line in lesson 1

learn = cnn_learner(data, models.resnet34, metrics=error_rate)

"NameError Traceback (most recent call last)

<ipython-input-9-efdbe27853be> in <module>() ----> 1 learn = cnn_learner(data, models.resnet34, metrics=error_rate)

NameError: name ‘cnn_learner’ is not defined"

I installed python 1.0.0 as suggested by the forum. Im using jupyter notebooks.
Do you know what it could be the problem?, thanks

Your fastai version may not be the latest… try using create_cnn instead of cnn_learner

This is fixed with v1.0.49 (Major new changes and features)

thanks for your reply. I tried this and didn’t work either

What’s your fastai version?

from fastai import *
print(__version__)

I downloaded the notebook again and start working on it and now is working. Thanks @SBecker @imrandude @ilovescience

Use this instead — { conda install pytorch=1.0.0 -c pytorch }

learn.fit_one_cycle how do I run it on GPU? (cuda available = True)