Skip to content

Instantly share code, notes, and snippets.

@joeyism
Last active August 8, 2018 01:18
Show Gist options
  • Save joeyism/f7c1d8746d63b35afd522900e3baf3f2 to your computer and use it in GitHub Desktop.
Save joeyism/f7c1d8746d63b35afd522900e3baf3f2 to your computer and use it in GitHub Desktop.
import tensorflow as tf
image_size = 32
input_images = tf.placeholder(tf.float32,
shape=[None, image_size, image_size, 3],
name="input_images")
# First CONV layer
kernel = tf.Variable(tf.truncated_normal([11, 11, 3, 96],
dtype=tf.float32,
stddev=1e-1),
name="conv1_weights")
conv = tf.nn.conv2d(input_images, kernel, [1, 4, 4, 1], padding="SAME")
bias = tf.Variable(tf.truncated_normal([96]))
conv_with_bias = tf.nn.bias_add(conv, bias)
conv1 = tf.nn.relu(conv_with_bias, name="conv1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment