Category Archives: PyTorch

PyTorch train() vs. eval() Mode

The bottom line of this post is: If you use dropout in PyTorch, then you must explicitly set your model into evaluation mode by calling the eval() function mode when computing model output values. Bear with me here, this is … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

Introduction to PyTorch on Windows

I wrote an article titled “Introduction to PyTorch on Windows” in the January 2019 issue of Microsoft MSDN Magazine. See https://msdn.microsoft.com/en-us/magazine/mt848704. Among my colleagues, the most commonly used neural network libraries are TensorFlow, Keras, CNTK, and, increasingly, PyTorch. I like … Continue reading

Posted in PyTorch | Leave a comment

Anomaly Detection Using a Deep Neural Autoencoder

Anomaly detection is the process of finding unusual data items. One standard approach is to cluster the data and then look at clusters with very few items, or at items that are far away from their cluster mean/average. Unfortunately, in … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

I Give a Talk About Neural Regression Using PyTorch

I work at a large tech company. One of the things I do at work is present short (about an hour) talks on machine learning and artificial intelligence topics. A few days ago I gave a talk on performing regression … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

A Crude Batching Class in Python for PyTorch and CNTK

Writing code is a skill, and like all skills, requires practice. I write code almost every day mostly because I enjoy the mental exercise but also to stay sharp. Today I thought I’d code up a crude batching class for … Continue reading

Posted in CNTK, Machine Learning, PyTorch

Neural Regression with PyTorch

I regularly use several neural network libraries including TensorFlow, Keras, CNTK, and PyTorch. I have a very good grasp of Keras and CNTK, but I’m still learning the nuances of PyTorch. Just a few days ago, PyTorch version 1.0 was … Continue reading

Posted in Machine Learning, PyTorch

Creating PyTorch Tensors

There are many neural network libraries. Three of the most popular are TensorFlow, Keras, and PyTorch. PyTorch is rapidly growing in popularity among my colleagues. The fundamental data structure in PyTorch is the tensor. A PyTorch tensor is a one-dimensional … Continue reading

Posted in PyTorch