images.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:GAN 作者: ilblackdragon 项目源码 文件源码
def conv_generator(x, output_dim, n_filters, scope='Generator'):
  with tf.variable_scope(scope):
    s4, s2 = int(output_dim / 4), int(output_dim / 2)
    z_ = layers.linear(x, s4 * s4 * n_filters * 2)
    h0 = tf.reshape(z_, [-1, s4, s4, n_filters * 2])
    h1 = layers.convolution2d_transpose(h0, n_filters, [5, 5], stride=2)
    h1 = tf.nn.elu(h1)
    h2 = layers.convolution2d_transpose(h1, 1, [5, 5], stride=2)
    return tf.reshape(tf.nn.tanh(h2), [-1, output_dim * output_dim])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号