(x)
| 14 | # |
| 15 | |
| 16 | def 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 | # |
no outgoing calls
no test coverage detected