(x_init, channels, use_bias=True, is_training=True, sn=False, scope='resblock')
| 98 | ################################################################################## |
| 99 | |
| 100 | def resblock(x_init, channels, use_bias=True, is_training=True, sn=False, scope='resblock'): |
| 101 | with tf.variable_scope(scope): |
| 102 | with tf.variable_scope('res1'): |
| 103 | x = conv(x_init, channels, kernel=3, stride=1, pad=1, pad_type='reflect', use_bias=use_bias, sn=sn) |
| 104 | x = batch_norm(x, is_training) |
| 105 | x = relu(x) |
| 106 | |
| 107 | with tf.variable_scope('res2'): |
| 108 | x = conv(x, channels, kernel=3, stride=1, pad=1, pad_type='reflect', use_bias=use_bias, sn=sn) |
| 109 | x = batch_norm(x, is_training) |
| 110 | |
| 111 | return x + x_init |
| 112 | |
| 113 | ################################################################################## |
| 114 | # Sampling |
nothing calls this directly
no test coverage detected