Colaboratory and Fastai

Hah, I used this tool called google.

Hmm, wonder what’s wrong with mine then.

fast%20ai3

While executing fastai.imports import *
I am getting the error cannot import as_tensor

Can anyone help me to resolve this?

Reset runtime once. It usually solves such issue.

The change in versions of fast.ai and Pytorch is the cause.
The following notebook runs flawlessly on Colab.

facing the same issue. i dont know what to do. lesson 8. pascal VOC

SOLVED :
installing with pip3 and installing older version of torchtext and old/fastai.

Following the tutorial from https://github.com/corykendrick/fastai_in_colab/blob/master/Using_Google_Colab_for_Fastai.ipynb

I have setup the fastai environment in Google Colab, but I have difficulty understanding the directory setting in Google Colab. I know that the parent directory for Google Colab is /content and all the materials I downloaded in Google Colab notebook are stored in /content. However, when I open a new Colab notebook and access /content again, the downloaded materials disappear. It seems to me that different Colab notebooks have their own parent directory independent of each other (though they are named the same as /content.) Am I on the right track to understanding the logic?

1 Like

I have the same problem, I would love to see an answer to this!

This is not my experience. The file system differ only if I switch from cpu to gpu, or python 2 to python 3, vice verse.

Only way it worked for me was to use smaller batch sizes.

Hi @everyone

I hope are doing all well. I am facing a problem with the datatype of the Satellite image which is float32 when I split it is all black and When I try to convert it to an uni signed 8 bit all turns white and my histogram explode. I would like for the mages ot to be black since I am using python for my work and it maximumly accept [0,…,255]. Plz I need help

Thanks