def decoder(z, reuse=False):
with tf.variable_scope('decoder') as vs:
if reuse:
vs.reuse_variables()
fc1 = fc_relu(z, 1024)
fc2 = fc_relu(fc1, 7*7*128)
fc2 = tf.reshape(fc2, tf.stack([tf.shape(fc2)[0], 7, 7, 128]))
conv1 = conv2d_t_relu(fc2, 64, 4, 2)
mean = tf.contrib.layers.convolution2d_transpose(conv1, 1, 4, 2, activation_fn=tf.sigmoid)
stddev = tf.contrib.layers.convolution2d_transpose(conv1, 1, 4, 2, activation_fn=tf.sigmoid)
stddev = tf.maximum(stddev, 0.005)
return mean, stddev
# Build the computation graph for training
mmd_vae_eval.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录