(x, channel, k_size, stride=1, name='conv_snorm')
| 53 | |
| 54 | |
| 55 | def conv_spectral_norm(x, channel, k_size, stride=1, name='conv_snorm'): |
| 56 | with tf.variable_scope(name): |
| 57 | w = tf.get_variable("kernel", shape=[k_size[0], k_size[1], x.get_shape()[-1], channel]) |
| 58 | b = tf.get_variable("bias", [channel], initializer=tf.constant_initializer(0.0)) |
| 59 | |
| 60 | x = tf.nn.conv2d(input=x, filter=spectral_norm(w), strides=[1, stride, stride, 1], padding='SAME') + b |
| 61 | |
| 62 | return x |
| 63 | |
| 64 | |
| 65 |
nothing calls this directly
no test coverage detected