fastaudio / fastai_audio

[DEPRECATED] 🔊️ Audio with fastaiv1
MIT License
160 stars 49 forks source link

**NameError: name 'cnn_learner' is not defined** #24

Closed AIClaire closed 5 years ago

AIClaire commented 5 years ago

Hello,

I am having an issue with the recent update in fastai impacting fastai_audio.

When I try to run my learner it posts the following error:


NameError Traceback (most recent call last)

in ----> 1 learn = audio_learner(db) 2 learn.lr_find() 3 learn.recorder.plot() ~/course-v3/nbs/audio/learner.py in audio_learner(data, base_arch, metrics, **kwargs) 4 def audio_learner(data:DataBunch, base_arch:Callable=models.resnet18, metrics=accuracy, **kwargs): 5 '''Wrapper function for fastai learner. Converts head of model to fit one channel input.''' ----> 6 return cnn_learner(data, base_arch, metrics=metrics, **kwargs) 7 8 def audio_predict(learn, item:AudioItem): **NameError: name 'cnn_learner' is not defined** Is there an update I can pull to fix this? Thanks! Claire
mogwai commented 5 years ago

What version of fastai are you using? How are you importing the audio module?

AIClaire commented 5 years ago

Hello - sorry for the delay - 1.0.45

I imported following the instructions on your first page.

AIClaire commented 5 years ago

Updated version of fastai and pytorch audio which fixed issue - sorry!