August 2017
Intermediate to advanced
288 pages
8h 6m
English
Looking into the steps of building an RBM model:
vb <- tf$placeholder(tf$float32, shape = shape(num_input)) hb <- tf$placeholder(tf$float32, shape = shape(num_hidden)) W <- tf$placeholder(tf$float32, shape = shape(num_input, num_hidden))
X = tf$placeholder(tf$float32, shape=shape(NULL, num_input)) prob_h0= tf$nn$sigmoid(tf$matmul(X, W) + hb) h0 = tf$nn$relu(tf$sign(prob_h0 - tf$random_uniform(tf$shape(prob_h0))))
prob_v1 = tf$matmul(h0, tf$transpose(W)) + vb v1 = prob_v1 + tf$random_normal(tf$shape(prob_v1), mean=0.0, stddev=1.0, dtype=tf$float32) h1 = tf$nn$sigmoid(tf$matmul(v1, W) + hb)
Read now
Unlock full access