Category Archives: Keras

Installing Anaconda3 2020.02 with Python 3.7.6 on Windows 10/11

Anaconda is a collection of software packages that contains a base Python engine plus over 500 compatible Python packages. You need to install Anaconda Python before you can install the PyTorch or Keras/TensorFlow neural network code libraries. See the links … Continue reading

Posted in Keras, Machine Learning, Miscellaneous, PyTorch | 2 Comments

Binary Classification Using Keras 2.8 on Windows 11

I recently revisited one of my standard PyTorch binary classification problems to make sure it worked on my current PyTorch (1.10) and Windows (11) versions. For completeness, I implemented the same neural network architecture using the same data, with Keras … Continue reading

Posted in Keras, Miscellaneous | Comments Off on Binary Classification Using Keras 2.8 on Windows 11

Predicting Employee Job Type Using Keras 2.8 on Windows 11

One of my standard examples for neural network classification is to predict employee job type (mgmt, supp, tech) from sex, age, city (anaheim, boulder, concord), and income. The data is artificial. I redo the example every few months to make … Continue reading

Posted in Keras, Miscellaneous | Comments Off on Predicting Employee Job Type Using Keras 2.8 on Windows 11

The Iris Dataset Example with Keras 2.8 on Windows 11

Because neural network code libraries (TensorFlow, Keras, PyTorch) constantly change, I redo a set of basic examples every few months to make sure no breaking changes have been introduced. A few days ago, I coded up an example of the … Continue reading

Posted in Keras, Miscellaneous | Comments Off on The Iris Dataset Example with Keras 2.8 on Windows 11

IMDB Movie Review Sentiment Analysis Using an LSTM with Keras

One of the major challenges of machine learning with TensorFlow, Keras, and PyTorch is that these libraries are under continuous development and so breaking changes are introduced every few months. I try to revisit core example programs as often as … Continue reading

Posted in Keras | Comments Off on IMDB Movie Review Sentiment Analysis Using an LSTM with Keras

Defining a Keras Model Using a Python Class

The most common way to define a simple Keras neural network network/model is to just crank it out as a sequence of Dense layers. For example, to create a 4-5-3 network for the Iris Dataset where the labels are already … Continue reading

Posted in Keras | Comments Off on Defining a Keras Model Using a Python Class

Keras Autoencoder Dimensionality Reduction for UCI Digits Visualization

One Sunday morning, after I walked my dogs, I decided to code up an example of using a Keras library autoencoder for dimensionality reduction for visualization of the UCI Digits dataset. The UCI Digits dataset consists of crude 8×8 images … Continue reading

Posted in Keras | Comments Off on Keras Autoencoder Dimensionality Reduction for UCI Digits Visualization

Time Series Classification Using a Keras Transformer Model

Deep neural systems based on Transformer Architecture (TA, also called multi-headed attention models) have revolutionized natural language processing (NLP). TA systems were designed to deal with sequence-to-sequence problems, such as translating English text to German text. TA systems can also … Continue reading

Posted in Keras | Comments Off on Time Series Classification Using a Keras Transformer Model

Ordinal Classification Using Keras

An ordinal classification problem (confusingly, also called ordinal regression) is one where the goal is to predict a class label in situations where the labels have an ordering. For example, you might want to predict the price of a house, … Continue reading

Posted in Keras | Comments Off on Ordinal Classification Using Keras

Yet Another MNIST Example Using Keras

It’s a major challenge to keep up with the continuous changes to the Keras/TensorFlow neural code library (and the PyTorch library too). I recently upgraded my Keras installation to version 2.6 and so I’m going through all my standard examples … Continue reading

Posted in Keras | 1 Comment