NameError: name 'create_cnn' is not defined

Hi Everyone , when i try training the model via this line of code :

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

i got this Error :

NameError: name ‘create_cnn’ is not defined

any suggestions ? thank U

1 Like

Issue Resolved , Thank U .

How did you resolve it? I have the same error. Thanks.

Hi , use cnn_learner instead , so your code should look like this:

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

hope it helped.


Thanks. That fixed it. I had to go back and reinstall the fastai course and do the updates in order, but working. Thanks again.

1 Like

glad you resolved it.