Skip to Content
R Deep Learning Essentials - Second Edition
book

R Deep Learning Essentials - Second Edition

by Mark Hodnett, Joshua F. Wiley
August 2018
Intermediate to advanced
378 pages
9h 9m
English
Packt Publishing
Content preview from R Deep Learning Essentials - Second Edition

LeNet

Now, we can create a model based on the LeNet architecture. This is a very simple model; we have two sets of convolutional and pooling layers and then a Flatten layer, and finally two dense layers. The code for this is in Chapter5/mnist.Rmd. First let's define the model:

data <- mx.symbol.Variable('data')# first convolution layerconvolution1 <- mx.symbol.Convolution(data=data, kernel=c(5,5), num_filter=64)activation1 <- mx.symbol.Activation(data=convolution1, act_type="tanh")pool1 <- mx.symbol.Pooling(data=activation1, pool_type="max",                           kernel=c(2,2), stride=c(2,2))# second convolution layerconvolution2 <- mx.symbol.Convolution(data=pool1, kernel=c(5,5), num_filter=32)activation2 <- mx.symbol.Activation(data=convolution2, act_type="relu") ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Deep Learning Cookbook

R Deep Learning Cookbook

PKS Prakash, Achyutuni Sri Krishna Rao
Hands-On Deep Learning with R

Hands-On Deep Learning with R

Rodger Devine, Michael Pawlus
R: Unleash Machine Learning Techniques

R: Unleash Machine Learning Techniques

Raghav Bali, Dipanjan Sarkar, Brett Lantz, Cory Lesmeister
Deep Learning with R Cookbook

Deep Learning with R Cookbook

Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar

Publisher Resources

ISBN: 9781788992893Supplemental Content