INNER CODE UNIT · Python
conv5_flat
aiff22/DPED · models.py:70
conv5_flat = tf.reshape(conv5, [-1, flat_size])
W_fc = tf.Variable(tf.compat.v1.truncated_normal([flat_size, 1024], stddev=0.01))
bias_fc = tf.Variable(tf.constant(0.01, shape=[1024]))
fc = leaky_relu(tf.matmul(conv5_flat, W_fc) + bias_fc)
W_out = tf.Variable(tf.compat.v1.truncated_normal([1024, 2], stddev=0.01))
bias_out = tf.Variable(tf.constant(0.01, shape=[2]))
adv_out = tf.nn.softmax(tf.matmul(fc, W_out) + bias_out)
return adv_out
def weight_variable(shape, name):
initial = tf.compat.v1.truncated_normal(shape, stddev=0.01)