models.py 文件源码

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

项目:chainer-began 作者: hvy 项目源码 文件源码
def __init__(self, n, out_size, out_channels, embed_size, block_size):
        super().__init__(
                l0=L.Linear(None, n * embed_size * embed_size),
                ln=L.Convolution2D(n, out_channels, 3, stride=1, pad=1))

        self.embed_shape = (n, embed_size, embed_size)
        self.n_blocks = int(log2(out_size / embed_size)) + 1
        self.block_size = block_size

        for i in range(self.n_blocks * block_size):
            self.add_link('c{}'.format(i),
                          L.Convolution2D(n, n, 3, stride=1, pad=1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号