return a (b, 1) logits
(self, inputs, outputs)
| 105 | |
| 106 | @auto_reuse_variable_scope |
| 107 | def discriminator(self, inputs, outputs): |
| 108 | """ return a (b, 1) logits""" |
| 109 | l = tf.concat([inputs, outputs], 3) |
| 110 | with argscope(Conv2D, kernel_size=4, strides=2, activation=BNLReLU): |
| 111 | l = (LinearWrap(l) |
| 112 | .Conv2D('conv0', NF, activation=tf.nn.leaky_relu) |
| 113 | .Conv2D('conv1', NF * 2) |
| 114 | .Conv2D('conv2', NF * 4) |
| 115 | .Conv2D('conv3', NF * 8, strides=1, padding='VALID') |
| 116 | .Conv2D('convlast', 1, strides=1, padding='VALID', activation=tf.identity)()) |
| 117 | return l |
| 118 | |
| 119 | def build_graph(self, input, output): |
| 120 | input, output = input / 128.0 - 1, output / 128.0 - 1 |
no test coverage detected