Lesson 1 In-Class Discussion ✅

Hi,
would like to know: how to train from scratch i.e. not using the pretrained weights ?

Please, please turn off the mic!!

4 Likes

Actually the validation set is some hold out data. It can be by accident that the validation set is a bit easier, so the loss is less.

That depends on how much data you have. Very large datasets use very small validation/test sets comparatively.

There are a few general strategies depending on how your data is fed into the model. If you use the raw waveform, you can normalize between -1.0 and 1.0 as well as use a technique called mu-law encoding (more details in a paper describing WaveNet).

Another common strategy is to create spectrograms from the audio, which essentially create 2d image-like data, so you can use similar strategies as we are seeing here.

I don’t believe fastai supports it yet, but I’m going to be focusing on audio data applications throughout this course.

11 Likes

Thanks, should have waited ~1 more minute before posting :slight_smile:

what error do you get,doing from windows cmd ?

Jeremy will go over that.

1 Like

and how do you think your code will know which of the pytorch’s to load when you say ‘import torch’? You must have only one installed, not too. Otherwise you’re shooting yourself in a foot. Please don’t suggest this to others. Thank you.

pip install torchvision-nightly (or torchvision-nightly-cpu) is the correct way.

3 Likes

I don’t think we should change the size of ResNet variables because if you do so, you need re-train your model completely from scratch as the weights downloaded have the same dimensions. If you’re talking about hyper-parameter, you’ll see Jeremy talk about changing the learning rate of resnet.

For some reason I can’t find the error_rate metric.

Hi @jeremy , I have a question on Image Size .
We are using a standard size of 224 or what ever . But each image will have different sizes so my thought is why cant we create a size based pattern like taking a square matrix and create a new matrix from a uneven image size and then again create a new image matrix from next part of the same image and so on and pass that to the ConvLearner as a data to be trained upon ?

Unfreeze the layers and reset the network parameters

jeremy will be showing how to plot a confusion matrix. It will more clear then.

Note: error_rate just returns (1 - accuracy)

Or turn off your speakers? lol

2 Likes

Got this error on using fit_one_cycle:

RuntimeError: DataLoader worker (pid 95) is killed by signal: Bus error.

I am using jupyter notebook on google colab.

1 Like

This is a known problem with colab. memory issues

Again, it’s a function! Try it in your notebook (print(error_rate)) etc.

Although I am sure this will be covered in later stages of the course, for anyone else who was curious as to what other pre-trained models are available the below URL might be of interest.

Open source deep learning code and pretrained models -> https://modelzoo.co/

2 Likes

I dont think collab supports pytorch1 yet ineffect not support fastai v1 either