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 recipe covers the steps for setting up Deep belief network (DBM):

  1. Define the number of nodes in each hidden layer as a vector:
RBM_hidden_sizes = c(900, 500 , 300 )
  1. Generate an RBM function leveraging the codes illustrated in the Setting up a Restricted Boltzmann Machine for Bernoulli distribution input recipe with the following input and output parameters mentioned:

Here is the function for setting up up the RBM:

RBM <- function(input_data, num_input, num_output, epochs = 5, alpha = 0.1, batchsize=100){# Placeholder variablesvb <- tf$placeholder(tf$float32, shape = shape(num_input))hb <- tf$placeholder(tf$float32, ...

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