Open LouiValley opened 7 years ago
def conv2d(x, input_filters, output_filters, kernel, strides, mode='REFLECT'): with tf.variable_scope('conv',reuse=False):
shape = [kernel, kernel, input_filters, output_filters] weight = tf.get_variable(name = 'weight',shape=shape,dtype = tf.float32, initializer=tf.truncated_normal_initializer(stddev=0.1),trainable=True) x_padded = tf.pad(x, [[0, 0], [kernel / 2, kernel / 2], [kernel / 2, kernel / 2], [0, 0]], mode=mode) return tf.nn.conv2d(x_padded, weight, strides=[1, strides, strides, 1], padding='VALID', name='conv')
def conv2d(x, input_filters, output_filters, kernel, strides, mode='REFLECT'): with tf.variable_scope('conv',reuse=False):