abdelkareem
(abdelkareem elkahtib )
October 14, 2022, 2:47pm
1
I am using colab and trying to run the following code
from fastai.conv_learner import *
from fastai.dataset import *
and I get the error :
No module named fastai.conv_learner!
caleb-da
(Caleb Robey)
October 14, 2022, 5:05pm
2
It looks like conv_learner is only available in the old version of fastai:
opened 05:03PM - 15 Dec 18 UTC
closed 07:43PM - 15 Dec 18 UTC
<!-- **Please note**: Installation issues should be reported here:
fastai-1.0… .x: http://forums.fast.ai/t/fastai-v1-install-issues-thread/24111
fastai-0.7.x: http://forums.fast.ai/t/fastai-v0-install-issues-thread/24652
-->
**Describe the bug**
Was conv_learner replaced in v1?
`from fastai.conv_learner import *` produces the following error:
```
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-c214d6004a52> in <module>()
----> 1 from fastai.conv_learner import *
2 from fastai.dataset import *
3
4 import pandas as pd
5 import numpy as np
ModuleNotFoundError: No module named 'fastai.conv_learner'
```
**To Reproduce**
`from fastai.conv_learner import *`
**Expected behavior**
Myself and other Kagglers are experiencing `ModuleNotFoundError` when Kaggle updated fastai to v1. I was wondering if conv_learner was replaced in the new version. If so, what cmd replaces the line of code mentioned above. I was able to figure out that `from fastai.dataset import *` is now `from fastai.datasets import *` Any assistance would be helpful. Thank you for an awesome library!
`---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-c214d6004a52> in <module>()
----> 1 from fastai.conv_learner import *
2 from fastai.dataset import *
3
4 import pandas as pd
5 import numpy as np
ModuleNotFoundError: No module named 'fastai.conv_learner'`
**Screenshots**
**Additional context**
I included the Kaggle Kernel that shows a kernel using fast.ai 0.7 and does not work since Kaggle updated to v1.
[https://www.kaggle.com/hung96ad/resnet34-with-rgby-fast-ai-fork-127e02](url)
So either install that or use something from here: fastai2/learner.py at master · fastai/fastai2 · GitHub
like the cnn_learner. It can be imported with from fastai.vision.all import *
1 Like
abdelkareem
(abdelkareem elkahtib )
October 14, 2022, 6:05pm
3
also alot of code in Kaggle is old version!
something like
from fastai.callbacks import *
it is really annoying for a beginner look for useful resources !
Simon7
(Simon )
November 5, 2022, 4:23am
4
I am also using colab and trying to install old version:
I am using colab and found that I need to install as follows:
!pip install fastai==0.7.0 --no-deps
!pip install torch==0.4.1 torchvision==0.2.1
from fastai.conv_learner import *
from fastai.dataset import *
getting the following error:
File “/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py”, line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 2, in
from fastai.conv_learner import *
File “/usr/local/lib/python3.7/dist-packages/fastai/conv_learner.py”, line 1, in
from .core import *
File “/usr/local/lib/python3.7/dist-packages/fastai/core.py”, line 31
if cuda: a = to_gpu(a, async=True)
^
SyntaxError: invalid syntax