Error with export

in lesson 4 : at 50:17 I am able to run to my model, and successfully fit it , no issues thus far.

However I am unable to do learn.export() … it returns the error :

However, I did define my dataloader , dls right before i did my,lr=lr).

On another note, whats the diff between and learn.fine_tune()

Hi Shay, as you can see in your error message, there is a problem when you build the Dataloaders. new_empty is a tensor attribute. It looks like you are using it on a list instead. I believe the way you build those loaders is wrong. Can you please show their definition ?


Hi Mr Charles,

First I define my test and validation dataset as a zipped list as shown below.

Then we create the dl and valid_dl using the DatLoader Class

Finally this is fet int othe DataLoaders Class that holds both the test and validation dataset

I also tried to export a pretrained model as shown below but it gave me an issue with regards to the path being a read only destination, However I am unable to change the save destination, i tried setting model_dir = ‘.’ but i am facing an issue because the Path is initally set to :

path = untar_data(URLs.MNIST_SAMPLE)
#download data from url
#path shows us where the file is
Path.BASE_PATH = path 
#sets ls to show current working directory where data is held

But I seem to be unable to change it

Here is some additional info regarding my current path, rather weird …