Skip to content

Commit eeaa47d

Browse files
author
joy.he
committed
support python3
1 parent 324cd9a commit eeaa47d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def conv2d(x, input_filters, output_filters, kernel, strides, mode='REFLECT'):
66

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

1212

0 commit comments

Comments
 (0)