Search code examples
pythondeep-learningfast-ai

Fastai DataBunch not defined


I am trying this source code in Windows 11, Python 3.9, virtualenv

https://github.com/master0fcha0s/lstm-pytorch/blob/master/flights-lstm.ipynb

and I get this error with DataBunch and I cannot find what I need to import

NameError: name 'DataBunch' is not defined

Solution

  • DataBunch is deprecated in the current version of Fast.ai. Either use FastAI1 https://fastai1.fast.ai/basic_data.html#DataBunch which has databunch or use the current version at https://docs.fast.ai