Skip to content

Commit

Permalink
support python3
Browse files Browse the repository at this point in the history
  • Loading branch information
joy.he committed Nov 6, 2017
1 parent 324cd9a commit eeaa47d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def conv2d(x, input_filters, output_filters, kernel, strides, mode='REFLECT'):

shape = [kernel, kernel, input_filters, output_filters]
weight = tf.Variable(tf.truncated_normal(shape, stddev=0.1), name='weight')
x_padded = tf.pad(x, [[0, 0], [kernel / 2, kernel / 2], [kernel / 2, kernel / 2], [0, 0]], mode=mode)
x_padded = tf.pad(x, [[0, 0], [int(kernel / 2), int(kernel / 2)], [int(kernel / 2), int(kernel / 2)], [0, 0]], mode=mode)
return tf.nn.conv2d(x_padded, weight, strides=[1, strides, strides, 1], padding='VALID', name='conv')


Expand Down

0 comments on commit eeaa47d

Please sign in to comment.