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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.