-
-
Save Laurans/4c05a12ad0cef23fbdc22b87da1e3d4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------- GRAPH -------------- | |
# Placeholder | |
x = tf.placeholder(tf.float32, [None, d_in]) | |
labels = tf.placeholder(dtype=tf.float32, shape=[None, d_out]) | |
# Learnable parameters | |
W = tf.Variable(tf.random_normal([d_in,d_out*pool_size])) | |
b = tf.Variable(tf.zeros([d_out*pool_size])) | |
# Computation | |
z = tf.matmul(x, W) + b | |
h = tf.reduce_max(tf.reshape(z, [-1,d_in,d_out,pool_size]), axis=3) | |
h = tf.reshape(h, [-1,1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment