SystemErrorWang / White-box-Cartoonization

Official tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations”

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

作者您好,我想请教一下您在network.py中的生成器G使用resblock的作用

zhang-ff opened this issue · comments

在u_net网络中使用到了
for idx in range(num_blocks):
x2= resblock(x2, out_channel=channel*4, name='block_{}'.format(idx))
这里循环调用resblock,在resblock中又做了两次卷积,我把resblock中每一次卷积后的结果进行了输出,显示为AddBias,但是具体的作用还是不太清楚。恳请各位指导。
def resblock(inputs, out_channel=32, name='resblock'):

with tf.variable_scope(name):
    
    x = slim.convolution2d(inputs, out_channel, [3, 3], 
                           activation_fn=None, scope='conv1')
    x= tf.nn.leaky_relu(x)
    x = slim.convolution2d(x, out_channel, [3, 3], 
                           activation_fn=None, scope='conv2')
    
    return x + inputs