Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
input_minus_mean = input - mean_image #Subtract mean from input images
layer1_weights = tf.get_variable("layer1_weights", [3, 3, 3, 64], initializer=tf.contrib.layers.variance_scaling_initializer())
layer1_bias = tf.Variable(tf.zeros([64]))
layer1_conv = tf.nn.conv2d(input_minus_mean, filter=layer1_weights, strides=[1,1,1,1], padding='SAME') #Use input_minus_mean now
layer1_out = tf.nn.relu(layer1_conv + layer1_bias)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment