(x, channel=32, is_training=True, name='discriminator', patch=True, reuse=False)
| 147 | |
| 148 | |
| 149 | def disc_ln(x, channel=32, is_training=True, name='discriminator', patch=True, reuse=False): |
| 150 | with tf.variable_scope(name, reuse=reuse): |
| 151 | |
| 152 | for idx in range(3): |
| 153 | x = slim.convolution2d(x, channel*2**idx, [3, 3], stride=2, activation_fn=None) |
| 154 | x = tf.contrib.layers.layer_norm(x) |
| 155 | x = tf.nn.leaky_relu(x) |
| 156 | |
| 157 | x = slim.convolution2d(x, channel*2**idx, [3, 3], activation_fn=None) |
| 158 | x = tf.contrib.layers.layer_norm(x) |
| 159 | x = tf.nn.leaky_relu(x) |
| 160 | |
| 161 | if patch == True: |
| 162 | x = slim.convolution2d(x, 1, [1, 1], activation_fn=None) |
| 163 | else: |
| 164 | x = tf.reduce_mean(x, axis=[1, 2]) |
| 165 | x = slim.fully_connected(x, 1, activation_fn=None) |
| 166 | |
| 167 | return x |
| 168 | |
| 169 | |
| 170 |
nothing calls this directly
no outgoing calls
no test coverage detected