return a (b, 1) logits
(self, imgs)
| 59 | |
| 60 | @auto_reuse_variable_scope |
| 61 | def discriminator(self, imgs): |
| 62 | """ return a (b, 1) logits""" |
| 63 | nf = 64 |
| 64 | with argscope(Conv2D, kernel_size=4, strides=2): |
| 65 | l = (LinearWrap(imgs) |
| 66 | .Conv2D('conv0', nf, activation=tf.nn.leaky_relu) |
| 67 | .Conv2D('conv1', nf * 2) |
| 68 | .BatchNorm('bn1') |
| 69 | .tf.nn.leaky_relu() |
| 70 | .Conv2D('conv2', nf * 4) |
| 71 | .BatchNorm('bn2') |
| 72 | .tf.nn.leaky_relu() |
| 73 | .Conv2D('conv3', nf * 8) |
| 74 | .BatchNorm('bn3') |
| 75 | .tf.nn.leaky_relu() |
| 76 | .FullyConnected('fct', 1)()) |
| 77 | return l |
| 78 | |
| 79 | def build_graph(self, image_pos): |
| 80 | image_pos = image_pos / 128.0 - 1 |
no test coverage detected