Howto: installation on Windows

As already mentioned in this thread, the PyTorch support for NVIDIA cards with compute capability <= 5 has ended. This means that my Windows-approach to deep learning does not work anymore. I spent considerable effort to make it work on Windows (because I had a laptop from my employer and wanted to use the GPU for something meaningful :slight_smile: ) but unfortunately I have to dismiss the idea and go back to AWS (which is not bad in anyway, but more expensive). It was clear from the start that these Windows laptops were not meant for deep learning, but as long as PyTorch support was given it worked out well. Now I have to give up unfortunately. That is my conclusion…

Great news!

1 Like

If you think your GPU is doing nothing, please note that in the task manager in the GPU view you can change one of the four diagrams to “Compute_0” and this will show it’s busy, just not with rendering 3D.

3 Likes

Really good news! Thank you for informing us!

The support is back for PyTorch 0.4.0 and window is officially supported now, you can check out Pytorch homepage.

1 Like

Hi @raelianer ,
Did you run any code that contains code m_vgg = to_gpu(vgg16(True)).eval() with to_gpu function?
I did part1 on my windows laptop with 960m, but now on part 2 I get error
" Found GPU0 GeForce GTX 960M which is of cuda capability 5.0." " PyTorch no longer supports this GPU because it is too old."

Update:
28.04.2018
cd to fastai directory in conda and writing conda env update installs pytorch 4 and this error is gone! All works. No need to install wheel or compile from source.

I just used conda install pytorch cuda91 -c pytorch - I tried conda env update afterwards and the problem came back.

I discovered fast.ai like two days ago, so all I’ve done so far is watching lesson one and running all cells of the jupyter notebook, which took about 1h 30m on my laptop (the second time I run it).

However after the update I get this warning:

C:\Users\Richard\fastai\courses\dl1\fastai\initializers.py:6: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
if hasattr(m, ‘weight’): init_fn(m.weight)

I also wanted to pip3 install torchvision but since it was running fine without it and it comes with it’s own dependencies I decided to spare me the hassle.

1 Like

Works well, also for Windows 7.
I just executed
conda install pytorch cuda90 -c pytorch
in addition to the Windows 7 installation oulined above

@jeremy, in the jupyter notebook lesson4-imdb.ipynb, we use the find command which does not work in Anaconda Prompt (but works in Ubuntu terminal).

The code is : find {TRN} -name '*.txt' | xargs cat | wc -w (with an exclamation point before find if the code is run in the notebook).

Which code can I use instead ?

Thanks! I tried everything in this post and this final solution solved my issue. I had a CUDA 8.0 before I am not sure if this causes the issue. But Installing CUDA 9.0 works.

Please correct me if I understood this wrong.

Mine is a Windows 10 machine with 4GB GTX 1050.
I downloaded CUDA 9.0 and Cudnn 7.0.5 and Tensorflow 1.5 for GPU
Now, following the steps here will make my machine ready for the fastai course? Will I not have to install pytorch and all those stuff ?

Update: Everything seems to be working fine for me. Here’s a snapshot. If someone can look at it and let me know if this is what we would expect on GPU usage

Thanks :slight_smile:!

1 Like

But there should be compute options showing up instead of Video Encode/Decode…(except that seems okaish)

Also try switching the display options (a right click on task manager graph)

Also whats your epoch time?(this will surely make it clear)

Also the fast.ai lib is Using PyTorch not tf…

Hello Jeremy,

Is it essential to install all the dependencies to activate fastai environment.i have run “conda env update” but couldn’t install mkl and cudnn due to internet problem. And if I run “activate fasti” it shows error that “fastai” env is not present. Also, fastai env is not listed using “conda info --envs”.

I guess the answer to my question will be yes. Because I tried to run “conda env create -f environment.yml” it also tried to install cudnn and mkl only and when I cancelled those two installations dependencies installation terminated. And when I tired to find “fastai” env using “conda info --envs” no luck again.

GPU usage is expected because of your learner. Great job!

1 Like

Reviving this thread with a problem I have.
I’m trying to install everything on a new PC (windows 10), where I can’t install Anaconda.
I’m using the old Git trick (pip install git+https://github.com/fastai/fastai.git), but it fails given that one of the requirements is “torch<0.4”, which is not available on PyPI (or on Windows, anyhow).

Same thing if I do “pip install fastai”: it fails on torch too.

Any help?
(Silly question, but I can’t make it!)

Anybody know if it is recommended to call “activate fastai” or “conda activate fastai” ?

I’ve been running the former so as to follow the instructions but admittedly I’m not familiar with the difference.

I believe new versions of anaconda use ‘conda activate’.

Are you sure you can’t install anaconda? You should be able to install it into your home directory normally.

I’m not sure anyone has tried pip installing the latest fastai on windows so you’ll be rather on your own there I’m afraid!