Explore a Neural Network With Dense Connections.

Right Here in Your Browser.

Um, What Is a Neural Network?

Neural network is a technique for building a computer program that learns from data. It is based very loosely on how we think the human brain works. First, a collection of software neurons are created and connected together, allowing them to send messages to each other. Next, the network is asked to solve a problem, which it attempts to do over and over, each time strengthening the connections that lead to success and diminishing those that lead to failure.

And What Are Dense Connections?

Dense connections are a type of connection used in structuring neural networks. The idea is to increase the amount of connections in a network by connecting different layers together. Dense connection is a shortcut connection that can skip the sequential order of layers. It is illustrated as the curved connections in the interactive plot. You can click on them to activate or disable the connection.

Sequential, DenseNet, And CondenseNet?

These are different neural network architectures. Sequential is the simplest, where each layer only depends on its previous layer. DenseNet is a Sequential network with some dense connections. CondenseNet can be thought of as an upgrade on DenseNet, where all possible dense connections are included, even the difficult ones. Click on the buttons to see them in action!

Where The Images Come From?

The images came from cifar-10 dataset, a public dataset containing 32*32 pixels RGB colored images. The models are trained on the training subset with 50,000 images. The images you see here are a sample from the 10,000 images in the testing subset.

Wait.. Why Some Outputs Seem Wrong?

Neural network and machine learning is an imperfect mapping between the input and output. They cannot get all of the output correct, and asking a computer to classify images is not an easy task. The model we have here contains only 4 hidden layers, where good performing models on cifar-10 dataset requires over 100 layers. In fact, the modes you see here only correctly identify the image category for about half of the inputs.


This project is inspired by TensorFlow Playground, which provides an interactive experience of developing neural networks without the need to code. The project references the graphic design used in the CondenseNet paper and the user interface design in TensorFlow Playground. D3.js library is used to implement interactive features and data visualizations in the project.