Category Archives: PyTorch

PyTorch Accuracy Function for Binary Classification

I regularly use the Keras (over TensorFlow), CNTK, and PyTorch neural network libraries. I use plain TensorFlow less often. A researcher might tell you that the different libraries are all quite similar in many respects, or perhaps talk about architectural … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

Neural Regression Using PyTorch

For the past several months I’ve been poking around the PyTorch neural network library. One of the fundamental problems for any NN library is numeric regression. I attacked one of my standard regression problems, the Boston Housing dataset. The goal … Continue reading

Posted in Machine Learning, PyTorch | Leave a comment

A Look at CNTK v2.6 and the Iris Dataset

Version 2.6 of CNTK was released a few weeks ago so I figured I’d update my system and give it a try. CNTK (“Cognitive Network Tool Kit”) is Microsoft’s neural network code library. Primary alternatives include Google’s TensorFlow and Keras … Continue reading

Posted in CNTK, Keras, Machine Learning, PyTorch

Neural Binary Classification Using PyTorch

Of the neural network code libraries I use most often (TensorFlow, Keras, CNTK, PyTorch), PyTorch is by far the least mature. The Windows version of PyTorch was released only a few weeks ago. So, there are almost no good PyTorch … Continue reading

Posted in Machine Learning, PyTorch

Managing Neural Network Library Versions

I regularly use four neural network code libraries: TensorFlow, Keras, PyTorch, and CNTK. The libraries require Python. Managing all the different versions of these libraries is an annoying detail that has to be taken care of very carefully. I recently … Continue reading

Posted in CNTK, Keras, Machine Learning, PyTorch

Yet Even More About PyTorch Neural Network Weight Initialization

I’ve been working through the details of the PyTorch neural network library. I’m still examining basic concepts like weight and bias initialization. Even a task as simple as setting weights to some fixed value is surprisingly tricky. Here’s example code … Continue reading

Posted in Machine Learning, PyTorch

PyTorch Classification Accuracy

I’ve been exploring the PyTorch neural network library. When using any library to perform classification, at some point you want to know the classification accuracy. The CNTK and Keras libraries have built-in accuracy functions, but PyTorch (and TensorFlow) do not. … Continue reading

Posted in Machine Learning, PyTorch