PyTorch 0.4.0 Released with Windows Support!

Aishwarya Singh 25 Apr, 2018 • 3 min read

Overview

  • PyTorch has finally added support for Windows!
  • Various other new features have also been released in the PyTorch 0.4 version for ONNX, Tensors and Neural Networks
  • Many improvements and bug fixes can also be seen in the latest update

 

Introduction

PyTorch users have been waiting a long time for the package to be officially launched on Windows and that wait is finally over! The latest release, PyTorch 1.4.0, has added Windows support among a slew of other additions and major improvements (and, needless to say, bug fixes).

For people who have not used this before, PyTorch is a Python package that developers usually use either as a replacement for NumPy (to utilise the power of GPUs), or as a deep learning platform that provides amazing flexibility and speed.

In this article, we give you an overview of the most important features and significant changes in the PyTorch 0.4.0 version.

 

New Features Launched

  • Windows Support: PyTorch now officially supports Windows! It has pre-compiled Conda binaries and pip wheels for Python 3.5 and 3.6. However, PyTorch on Windows doesn’t support distributed training (yet) and might be a tad bit slower than Linux / OSX because Visual Studio supports an older version of OpenMP
  • ONNX: PyTorch has improved support for RNN and it can now export a subset of RNNs to ONNX. Apart from this, there are various new operators added to ONNX
  • Tensors: PyTorch now fully supports advanced indexing, following numpy’s advanced indexing rules. Also added FFT (Fast Fourier transform)
  • Neural Networks: Introduced a new autograd container that lets the user store a subset of outputs necessary for backpropagation. Apart from this, PyTorch also has a tool, appropriately named bottleneck, that can be used as an initial step for debugging bottlenecks in your program
  • torch.distributions: It now includes 24 basic probability distributions and many methods such as cdf, variance, entropy, perplexity, etc.
  • Distributed Training:A noteworthy feature is the addition of an utility function to help launch jobs on a distributed setup.Man
  • C++ Extensions: PyTorch provides a system for users where they can write their own C++ / CUDA extensions!

 

Major Core Changes and improvements

  • Tensors and Variables have merged. torch.Tensor is capable of tracking history and behaves like the old Variable. This means that there is no need of using Variable wrapper everywhere in the code
  • Some operations can now return scalar (zero dimensional) Tensors .Previously indexing into a Tensor vector gave a Python number but indexing into a variable vector gave a vector. This release introduces scalar support in PyTorch
  • The volatile flag is now deprecated and has no effect
  • PyTorch introduced torch.dtype, torch.device and torch.layout classes in order to allow better management of properties through NumPy-style creation functions
  • In the previously existing versions of PyTorch, it was difficult to write code which was device agnostic. To resolve the problem, this version provides support for writing device-agnostic code

This was just a glimpse of the latest PyTorch version. There are many other interesting features, bug fixes and improvements made which you can view on their GitHub page.

You can also refer to this migration guide to transition your code to the newest version.

 

Our take on this

As you might have guessed by now, we are most excited about PyTorch finally makes it’s debut on Windows (officially). There have been previous workarounds provided in the community by users but making this official is a welcome feature indeed. I really liked the addition of the probability distributions as well.

The Tensor-Variable merge and Zero Dimension (scalar) Tensor improvements should make your code tidier and easier to read. Which feature are you most looking forward to using? Let us know your opinion in the comments section below!

 

Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!

 

Aishwarya Singh 25 Apr 2018

An avid reader and blogger who loves exploring the endless world of data science and artificial intelligence. Fascinated by the limitless applications of ML and AI; eager to learn and discover the depths of data science.

Frequently Asked Questions

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

Responses From Readers

Clear

Charles Rose
Charles Rose 31 Jul, 2018

I tried to download and install Pytorch in my Windows 10 laptop but I only giot an error message. I scanned the Internet looking for a solution, but the advice that I found was not useful. At this time, I am frustrated, to say the least. Can you please provide step-by-step instructions on 1_ how to download PYTORCH FOR WINDOWS 10 2_ how to install PYTORCH FOR WINDOWS 10 Thank you, Charles Rose

Related Courses