This recipe covers the steps for setting up Deep belief network (DBM):
- Define the number of nodes in each hidden layer as a vector:
RBM_hidden_sizes = c(900, 500 , 300 )
- 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, ...