O'Reilly logo

R Deep Learning Cookbook by Achyutuni Sri Krishna Rao, Dr. PKS Prakash

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

This section covers the steps for setting up a feed-forward backpropagation Neural Network:

  1. Let's define the input parameters of the neural network as function parameters. The following table describes each parameter:

The neural network function will have a structure as shown in the following script:

NN_train <- function(Xdata,Ydata,Xtestdata,Ytestdata,input_size,learning_rate=0.1,momentum = 0.1,epochs=10,batchsize=100,rbm_list,dbn_sizes){library(stringi)## insert all the codes mentioned in next 11 points}
  1. Initialize a weight and bias list of length 4, with the first being a tensor of random normal distribution (with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required