How do I get these images to show up in the notebooks? Thanks!
Here’s an example from 00_notebook_tutorial.ipynb:
How do I get these images to show up in the notebooks? Thanks!
Here’s an example from 00_notebook_tutorial.ipynb:
I was also not able to show them up in colab. Have you tried specifying the full path instead of absolute? Like /content/images/notebook_tutorial/add.png
Also, try replacing it with the html tag:
<img src="/content/images/notebook_tutorial/add.png" alt="add">
Hi deep-learner hope all is well!
Not sure how you loaded the notebook, but image directories often don’t get loaded automatically.
Have you checked the images are actually in that location by using the !ls -al command.
On Colab you can drag images into the correct directory and double click them to view them to confirm they are there.
cheers mrfabulous1
Its better to first change the directory using !cd /content/drive/My Drive and then download the data
did you get the solution? I’m facing the same issue
Hi! I have an “error” when running Lesson 2’s code.
I’ve copy and pasted the code into a new document and everything is fine except when I run the code to find the learning rate.
I run: learn.lr_find()
and I get:
It’s just a bunch of #na#'s
The graph looks normal:
Is there something wrong with the code? Everything seems to be working fine except for the #na# part.
Thanks!
Hi joegold Hope your having a jolly day!
It is my understanding that the validation loss is not calculated when using lr_find() hence #na#.
Cheers mrfabulous1
Heads up for Colab users:
To use PyTorch 1.6 in colab, you need to do the following (and when installing fastai):
!wget 'torch-1.6.0+cu101-cp36-cp36m-linux_x86_64.whl'
!pip install 'torch-1.6.0+cu101-cp36-cp36m-linux_x86_64.whl'
(then of course pip install fastai2
, etc)
If you’re running CUDA 10.2 then you will need to replace the whl
link (and filename) with:
https://download.pytorch.org/whl/cu102/torch-1.6.0-cp36-cp36m-linux_x86_64.whl
and torch-1.6.0-cp36-cp36m-linux_x86_64.whl
This is no longer needed.
All that is needed in Colab is:
!pip install fastai2
(Colab now comes with PyTorch 1.6.0)
I guess until today it is still recommended, because some Colab instances still have “old” torch-1.6.0-cu101
that causes
Tesla T4 with CUDA capability sm_75 is not compatible with the current PyTorch installation.
Although PyTorch team has fixed it, the fixed binary (wheel) seems not being sufficiently replaced on Colab yet.
Hi there!
I had the same error when I cloned the git repo into my Google Drive and run the notebook in colab. It is because the images are stored in a different folder. You could mount your drive in colab and change the path. Or you can run the notebook from the git repo folder by using %cd in colab.
Hi guys,
I am using Colab, and it took about 34 minutes to train the model. I wander why?
You didn’t turn on GPU. Runtime->Change runtime type->GPU.
[quote=“jeremy, post:1, topic:28161”]
To spin up your server, run setup_colab
and pass in your server token.
what should we do exactly?
i signed up on ngork , im seeing the token , i have signed up for colab too , i ran those two fns, how should i pass the token ? which is the token ?
setup_colab(1gGlGEsmDy6s2wabDL2vguRXvp7_5nKrNWbkKGgeeyXPCm4KT) i tried this on colab but im getting error
that’s really old. you don’t need that. it’s best to go by the server setup section at the start of the course.
i use this as the first cell in each notebook on colab.
!curl -s https://course.fast.ai/setup/colab | bash
from google.colab import drive
drive.mount('/content/drive')
drive_folder = "FOLDER_NAME"
from pathlib import Path
drive_root = Path("/content/drive/My Drive/")
drive_path = drive_root/"fastai-v3"/drive_folder
drive_path.mkdir(parents=True, exist_ok=True)
import warnings
warnings.filterwarnings('ignore')
import torch; assert torch.cuda.is_available(), "Turn on GPU"
!curl -s https://course.fast.ai/setup/colab | bash , this line does not work
In addition, how do I change the base path so I don’t need to download the data from fastai to the root/.fast folder that is hidden for colab?
If you’re trying to set up the old course, could try course19 rather than course
Hi. You can fix it by setting the download location and setting the path variable:
Your problem is dataset were downloaded to the hidden folder of Colab, so Colab won’t allow you to see them in the file panel.
Here is my fastbook18 for solving this issue.
Below is what I did to fastbook 18.
mkdir happy-sugar-life
path = untar_data(URLs.IMAGENETTE_160, dest= "/content/happy-sugar-life")
You can see my fastbook’s notebook 11, 15, 18, and 19 were all set in this way to avoid this problem, and I have ran all these 4 notebooks and they all work perfectly.
Again, here is my Colab that solved this issue. https://github.com/JonathanSum/Fastbook_colab
Maybe I should ask @jeremy or @muellerzr that should we make a pull request to change it to create a folder and download them into that folder, rather than downloading to a hidden Colab folder that we can not see?
Unfortunately,
!curl -s https://course19.fast.ai/setup/colab | bash
doesnt look like correct solution.
It installs fastaiv1(1.0.61) and fastaiv2(0.30) and the latter one causes that i.e. ImageDataBunch class does not exist.
What helped me to take the script from “https://course19.fast.ai/setup/colab”, modify it to force only installation of fastaiv1 and after that also to force pandas downgrade to be compatible with colab.
!mkdir -p /root/.torch/models
!mkdir -p /root/.fastai/data
!ln -s /root/.torch/models /content
!ln -s /root/.fastai/data /content
!rm -rf /content/sample_data/
!pip3 install fastai==1.0.61 --force
!pip install pandas==1.0.0
After runtime restart, notebooks run again