MCPcopy Create free account
hub / github.com/OUCMachineLearning/OUCML / generator

Function generator

GAN/ebgan-master/model.py:16–27  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

14#
15
16def generator(x):
17
18 reuse = len([t for t in tf.global_variables() if t.name.startswith('generator')]) > 0
19 with tf.sg_context(name='generator', size=4, stride=2, act='leaky_relu', bn=True, reuse=reuse):
20
21 # generator network
22 res = (x.sg_dense(dim=1024, name='fc_1')
23 .sg_dense(dim=7*7*128, name='fc_2')
24 .sg_reshape(shape=(-1, 7, 7, 128))
25 .sg_upconv(dim=64, name='conv_1')
26 .sg_upconv(dim=1, act='sigmoid', bn=False, name='conv_2'))
27 return res
28
29
30#

Callers 11

gan.pyFile · 0.50
test.pyFile · 0.50
esrgan.pyFile · 0.50
test_on_image.pyFile · 0.50
esrgan.pyFile · 0.50
test_on_image.pyFile · 0.50
sample_imagesFunction · 0.50
pix2pix.pyFile · 0.50
began.pyFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected