Platform: Colab ✅

(Jeremy Howard (Admin)) #1

Any questions related to the free Google Colab service can be posted here.

Reference to course announcement on this.

Note that this is a forum wiki thread, so you all can edit this post to add/change/organize info to help make it better! To edit, click on the little pencil icon at the bottom of this post. Here’s a pic of what to look for:


FAQ, resources, and official course updates ✅
ImageCleaner missing argument in lesson 2 download notebook
How to get rid of underfitting for my model
(vikas) #2

ConvLearner vs Learner.create_cnn
In Collab ConvLearner works, instead of Learner.create_cnn. Fastai versioning issue?

(Tabish Shaikh) #3

Yes getting attribute not found error

(Jeremy Howard (Admin)) #4

If you conda update now that should be fixed.

(Maryam) #5

Previously, Convlearner worked perfectly on Colab, but now I get this error : name ‘ConvLearner’ is not defined. Is there any change in the library?

(kheng oon low) #6

Please refer to this guide to setup Colab with the latest fastai library.

Fastai library was updated (i think yesterday) and Convlearner() is replaced with create_cnn().

(Jeremy Howard (Admin)) #7

Yes - please see the official updates topic:

Timisoara study group - Live
(Maryam) #8

I confronted a new problem in setting the colab. This code " !curl | bash "does not work anymore for me,and I get this error
bash: line 2: syntax error near unexpected token `<’

(Satyajit Tarai) #9

Can you please screen shot. I think this syntax error. As this works for me.

(Satyajit Tarai) #10

Can you please screen shot. I think this syntax error. As this works for me.

(Maryam) #11

Thanks. I think I found the problem. It was due to using http instead of https.

(Bhuvana Kundumani) #12

You can install fast ai with the following commands in Colab

!pip install torch_nightly -f
!pip install fastai

(Vignesh J) #13

I want to know a better understanding of this animated training of ResNet34 model in Colab
1.What GPU does colab use?
2.What is that number 92 denote during the training?

Here is another image I’m attaching

1.Why does my losses are higher or varies significantly compared to the one that was shown on the tutorial?
2. Is training time an indication of GPU or batch size?

(Gabriel) #14
  1. Colab uses a nvidia K80 gpu (you only get half of it though)

  2. The number 92 is the number of training examples or batches in the training set, 74/92 tells you that it has process 74 of 92 batches.

  3. Depending on how you initialize the model, and random seed, the databunch and learner will/can use different random numbers and give different results. Alternatively you have forgotten to run a cell in the notebook or there is something wrong with your code.

  4. As far as a better GPU gives you faster processing time and the “right” batch size allows the GPU not to waste time loading partial data, yes to both.

(Amisha Rawat) #15

!curl | bash
Will I have to run this command every time I start working on new jupyter notebook, if I am using Colab?

(Apoorv Parle) #16

Is there a way to install jupyter notebook extensions in the colab environment ?

I’ve been using when experimenting with local notebooks. Wondering if someone has figured out a way to enable this or any other notebook extension.

(Memunat A. Ibrahim) #17

i think so

(Gabriel) #18

Yes, and everytime you reset your runtime.

You will also lose any data or files on the instance between sessions, so backing up your project data and models is necessary.

(Memunat A. Ibrahim) #19

how do i back up my project data and models?

(Ritesh Chaurasia) #20

go to file -> save a copy in drive