Coverage for hypergan/discriminators/dcgan_discriminator.py : 30%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
return []
config = self.config gan = self.gan ops = self.ops activation = ops.lookup(config.activation or 'lrelu') improved = config.improved
net = self.add_noise(net) net = ops.conv2d(net, 3, 3, 2, 2, 64) if improved: net = self.layer_regularizer(net) net = activation(net) for layer in range(3): net = ops.conv2d(net, 3, 3, 2, 2, ops.shape(net)[-1]*2) net = self.layer_regularizer(net) net = activation(net) net = ops.reshape(net, [ops.shape(net)[0],-1]) net = ops.linear(net, config.final_features or 1) if improved: net = self.layer_regularizer(net) net = activation(net)
return net
|