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.
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.
[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
the first line makes sure everything is up to date.
change drive_folder to a lesson or project name and it’ll give you somewhere to save models and other files so you don’t lose them when the runtime gets recycled.
the warnings filter is for a pytorch issue which generates lots of warnings you can ignore, you won’t need that next week when fastai 2 comes out.
the assert at the end makes sure you don’t forget to turn on gpu
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.
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.
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?
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.
My previous code doesnt work, if you want to load old pth model file in fastai v1 on Colab with torch 1.6
I got stuck with error
ModuleAttributeError: ‘BatchNorm2d’ object has no attribute ‘_non_persistent_buffers_set’
And following “dependancy hell” forced me to use conda on Colab, the scripts below seem to solve it, now loading pth without issues: