def _encoder(self, x, is_training=None):
net = self.arch['encoder']
for i, (o, k, s) in enumerate(zip(net['output'], net['kernel'], net['stride'])):
x = conv2d_nchw_layernorm(
x, o, k, s, lrelu,
name='Conv2d-{}'.format(i)
)
x = slim.flatten(x)
z_mu = tf.layers.dense(x, self.arch['z_dim'])
z_lv = tf.layers.dense(x, self.arch['z_dim'])
return z_mu, z_lv
评论列表
文章目录