August 2017
Intermediate to advanced
288 pages
8h 6m
English
# Create a new fully connected layercreate_fc_layer <- function(input,num_inputs,num_outputs,use_relu=True){# Create new weights and biases.weights = weight_variable(shape=shape(num_inputs, num_outputs))biases = bias_variable(shape=shape(num_outputs))# Perform matrix multiplication of input layer with weights and then add biaseslayer = tf$matmul(input, weights) + biases# Use ReLU?if(use_relu){layer = tf$nn$relu(layer)}return(layer)}
Read now
Unlock full access