Fastai v1 - Slow Learning (!?)


I am running the fastai libraries 0.7.x and v1 on Paperspace (Ubuntu 14.04, RAM: 30 GB, CPUS: 8, HD: 10.2 GB / 250 GB, GPU: 8 GB, Machine Type: P4000).

I have 2 virtual environments with Python 3.6. installed.
One is for fastai 0.7.x and one for fastai v1.

I run the following code with fastai 0.7.x and it trains in about 1 minute:

This code I run with fastai v1 and it would take more than 6 hours to train:

Anyone has some idea why this is the case?

Thanks very much in advance! :slight_smile:

I would guess that your fastai v1 setup is not using the GPU for some reason

1 Like

Hi William,

yes you are right and I just had the same thought and checked why that might be and I found the reason.

I installed via pip and had the wrong cuda version (92 instead of 90).
I just reinstalled it with cuda90 and it works just fine.

It was totally my mistake since it even says it to be careful about that in fastai/README in the installation instructions.

But I am not gonna delete my post/topic … because somebody in the future might make the same mistake as I did and then can find the solution here :wink:


Hey there,
I was curious about your troubleshooting steps. How did you know that it’s not using the GPU? Did you do it at the python level? Or doing at the unix level. eg. calling nvidia-smi to see if any memory is used during epochs are running


A first check is torch.cuda.is_available() to see if pytorch recognizes the GPU or not.

hi bruce,

according to pytorch you have 8.0, 9.0, 9.2 which can be used.
since 9.2 was wrong I just had 2 more to try … i know, not the most
professional approach :wink: