vaegan.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:chainer-image-generation 作者: fukuta0614 项目源码 文件源码
def __init__(self, density=1, size=64, channel=3):
        assert (size % 16 == 0)
        initial_size = size / 16
        super(Discriminator, self).__init__(
            dis1=L.Convolution2D(channel, 32 * density, 4, stride=2, pad=1,
                                 wscale=0.02 * math.sqrt(4 * 4 * channel * density)),
            dis2=L.Convolution2D(32 * density, 64 * density, 4, stride=2, pad=1,
                                 wscale=0.02 * math.sqrt(4 * 4 * 32 * density)),
            norm2=L.BatchNormalization(64 * density),
            dis3=L.Convolution2D(64 * density, 128 * density, 4, stride=2, pad=1,
                                 wscale=0.02 * math.sqrt(4 * 4 * 64 * density)),
            norm3=L.BatchNormalization(128 * density),
            dis4=L.Convolution2D(128 * density, 256 * density, 4, stride=2, pad=1,
                                 wscale=0.02 * math.sqrt(4 * 4 * 128 * density)),
            norm4=L.BatchNormalization(256 * density),
            dis5=L.Linear(initial_size * initial_size * 256 * density, 512,
                          wscale=0.02 * math.sqrt(initial_size * initial_size * 256 * density)),
            norm5=L.BatchNormalization(512),
            dis6=L.Linear(512, 2, wscale=0.02 * math.sqrt(512)),
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号