Implementing the LeNet architecture with the MXNet library

In their 1998 paper, Gradient-Based Learning Applied to Document Recognition, LeCun et al. introduced the LeNet architecture.

The LeNet architecture consists of two sets of convolutional, activation, and pooling layers, followed by a fully-connected layer, activation, another fully-connected layer, and finally a softmax classifier. The following diagram illustrates the LeNet architecture:

LeNet architecture

Now, let's implement the LeNet architecture with the mxnet library in our project using the following code block:

## setting the working directorysetwd('/home/sunil/Desktop/book/chapter ...

Get Advanced Machine Learning with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.