Using TensorFlow-DirectML for online courses
The easiest way to get GPU acceleration for Jupyter Notebooks on Windows 10 and WSL
Are you learning about Machine Learning or interested in doing so? There are a wide variety of online courses available today that provide you with in-depth knowledge about ML. Many of these courses use Jupyter Notebooks, an open source software for interactive computing providing a clean interface to write and execute code, alongside TensorFlow, a software framework for traditional ML and deep learning tasks. Training deep learning models can be compute intensive. Luckily, GPUs massive parallelization capabilities can be quite effective at speeding up the training of such models. And now, with TensorFlow-DirectML, you can get high-performance, GPU accelerated training on the breadth of Windows hardware.
The best part is that installing TensorFlow-DirectML is as simple as running “pip install tensorflow-directml” in your Python environment of choice. (For additional information on installing and running TensorFlow-DirectML, please visit the documentation). After installation, when you open a Jupyter Notebook in your Python environment and run a TensorFlow script, you will automatically get GPU acceleration on any Windows device, no changes necessary! You will see “Using TensorFlow backend” at the bottom of the first code block, like the image below:
A great course to start with is the Neural Networks and Deep Learning Coursera course, but we encourage you to use Tensorflow-DirectML for any TensorFlow related course. In order to use TensorFlow-DirectML, you must be running in a local Python environment on Windows 10 or WSL. Some online courses require the use of web based Jupyter notebooks to receive credit, and in this case you will not be able to use TensorFlow-DirectML.
Try it out today! Your feedback is important to us, so please reach out with any suggestions, questions, or issues on our GitHub. Show us what you’re learning by tagging #TensorFlowDirectML on Twitter or mention Tensorflow-DirectML on Reddit, and stay tuned to the Windows AI Blog for more updates!
* TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.
Does this work with PyTorch too? Some of the models I want to run are in PyTorch
Hi Ed, currently this only works with TensorFlow, but we will certainly consider your feedback for future updates. Thank you for reaching out!
Thank you very much miss Parsons.