I am getting status error as I run the cell:
urls = search_images(‘bird photos’, max_images=1)
urls[0]
Can anyone please help and I am so much confused between whether to use Kaggle or Colab are the content in both notebooks same?
If I remember correctly, I’ve faced the same issue before. I’m not sure if this will help for your case, but try running this instead:
searches = 'photo of a damaged car','photo of a car'
path = Path('car_damage')
for o in searches:
dest = (path/o)
dest.mkdir(exist_ok=True, parents=True)
try:
download_images(dest, urls=search_images(f'{o} photo'))
resize_images(dest, max_size=400, dest=dest)
except Exception as e:
print(f"An error occurred: {e}")
In my case, I had to run it multiple times to get it to work, but there might be a more efficient way to solve it…
As for the Kaggle vs Colab, I believe there are some lessons in Kaggle Notebooks as you progress through the course, and the textbook is available on Colab. I personally use both platforms. When working through the textbook, I fork the notebook and use my own copy in Colab. And the ease with Kaggle is that you have easy access to the datasets.
Hi, I’m having an issue with the “Is it a bird?” exercise.
The !pip install command is failing… I don’t know why and how to fix this. The internet is connected.
I ran into the same issue and stumbled about the notebook from @chizkidd (see his comment below). I tested his notebook and it worked. Despite his code changes the only difference was that the environment preferences were set to “Pin to original environment”. I checked my copy of this notebook and it was set to “Always use latest environment”.
After switching back to “Pint to original environment” the error was gone and I was able to run the whole notebook
Hope this works for you, too.
I am using python 3.12. I installed fastai using pip in my virtual environment in vscode. while running the statement:
fastai.vision.all import *
I am getting the following error
ModuleNotFoundError: No module named ‘torch._namedtensor_internals’
I am running the notebooks on my personal laptop.
I had my fastai setup using pip on linux
# Install required packages first
sudo apt install python3-venv python3-full
# Create virtual environment
python3 -m venv ~/fastai_env
# Activate it
source ~/fastai_env/bin/activate
# Upgrade `pip`, `setuptools`, and `wheel`
pip install --upgrade pip setuptools wheel
# Install ipython & Jupyterlab
pip install ipykernel
pip install jupyterlab
# Install Pytorch from its official site installation manual
pip3 install torch torchvision torchaudio
# Install Fastai , fastbook
pip install fastai
pip install fastbook
pip install sentencepiece
Now , Open the jupyter notebook via terminal (and start doing fastai course):
# Activate the virtual environment
source ~/fastai_env/bin/activate
# To use Jupyter lab
jupyter lab
# To use Jupyter notebook
jupyter notebook
# To use Jupyter notebook Classic (Jeremy's favorite)
jupyter nbclassic