当前位置: 首页>>代码示例>>Python>>正文


Python links.DeconvolutionND方法代码示例

本文整理汇总了Python中chainer.links.DeconvolutionND方法的典型用法代码示例。如果您正苦于以下问题:Python links.DeconvolutionND方法的具体用法?Python links.DeconvolutionND怎么用?Python links.DeconvolutionND使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chainer.links的用法示例。


在下文中一共展示了links.DeconvolutionND方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from chainer import links [as 别名]
# 或者: from chainer.links import DeconvolutionND [as 别名]
def __init__(self, nb_inputs, channel_list, ksize_list, no_act_last=False):
        super(Decoder, self).__init__()
        self.nb_layers = len(channel_list)
        self.no_act_last = no_act_last
        channel_list = channel_list + [nb_inputs]
        for idx, (nb_in, nb_out, ksize) in enumerate(zip(channel_list[:-1], channel_list[1:], ksize_list[::-1])):
            self.add_link("deconv{}".format(idx), L.DeconvolutionND(1, nb_in, nb_out, ksize))
            if no_act_last and idx == self.nb_layers - 1:
                continue
            self.add_link("bn{}".format(idx), L.BatchNormalization(nb_out)) 
开发者ID:takumayagi,项目名称:fpl,代码行数:12,代码来源:module.py

示例2: added

# 需要导入模块: from chainer import links [as 别名]
# 或者: from chainer.links import DeconvolutionND [as 别名]
def added(self, link):
        # Define axis and register ``u`` if the weight is initialized.
        if not hasattr(link, self.weight_name):
            raise ValueError(
                'Weight \'{}\' does not exist!'.format(self.weight_name))
        if isinstance(link, (L.Deconvolution2D, L.DeconvolutionND)):
            self.axis = 1
        if getattr(link, self.weight_name).array is not None:
            self._prepare_parameters(link) 
开发者ID:chainer,项目名称:chainer,代码行数:11,代码来源:spectral_normalization.py

示例3: __init__

# 需要导入模块: from chainer import links [as 别名]
# 或者: from chainer.links import DeconvolutionND [as 别名]
def __init__(self, in_channels=1, n_classes=4):
        init = chainer.initializers.HeNormal(scale=0.01)
        super().__init__()

        with self.init_scope():
            self.conv1a = L.ConvolutionND(
                3, in_channels, 32, 3, pad=1, initialW=init)
            self.bnorm1a = L.BatchNormalization(32)
            self.conv1b = L.ConvolutionND(
                3, 32, 32, 3, pad=1, initialW=init)
            self.bnorm1b = L.BatchNormalization(32)
            self.conv1c = L.ConvolutionND(
                3, 32, 64, 3, stride=2, pad=1, initialW=init)
            self.voxres2 = VoxResModule()
            self.voxres3 = VoxResModule()
            self.bnorm3 = L.BatchNormalization(64)
            self.conv4 = L.ConvolutionND(
                3, 64, 64, 3, stride=2, pad=1, initialW=init)
            self.voxres5 = VoxResModule()
            self.voxres6 = VoxResModule()
            self.bnorm6 = L.BatchNormalization(64)
            self.conv7 = L.ConvolutionND(
                3, 64, 64, 3, stride=2, pad=1, initialW=init)
            self.voxres8 = VoxResModule()
            self.voxres9 = VoxResModule()
            self.c1deconv = L.DeconvolutionND(
                3, 32, 32, 3, pad=1, initialW=init)
            self.c1conv = L.ConvolutionND(
                3, 32, n_classes, 3, pad=1, initialW=init)
            self.c2deconv = L.DeconvolutionND(
                3, 64, 64, 4, stride=2, pad=1, initialW=init)
            self.c2conv = L.ConvolutionND(
                3, 64, n_classes, 3, pad=1, initialW=init)
            self.c3deconv = L.DeconvolutionND(
                3, 64, 64, 6, stride=4, pad=1, initialW=init)
            self.c3conv = L.ConvolutionND(
                3, 64, n_classes, 3, pad=1, initialW=init)
            self.c4deconv = L.DeconvolutionND(
                3, 64, 64, 10, stride=8, pad=1, initialW=init)
            self.c4conv = L.ConvolutionND(
                3, 64, n_classes, 3, pad=1, initialW=init) 
开发者ID:Ryo-Ito,项目名称:brain_segmentation,代码行数:43,代码来源:model.py

示例4: __init__

# 需要导入模块: from chainer import links [as 别名]
# 或者: from chainer.links import DeconvolutionND [as 别名]
def __init__(self, n_frames=16, z_slow_dim=256, z_fast_dim=256, wscale=0.01):
        super(FrameSeedGeneratorInitUniform, self).__init__()
        w = chainer.initializers.Uniform(wscale)
        with self.init_scope():
            self.dc0 = L.DeconvolutionND(1, z_slow_dim, 512, 1, 1, 0, initialW=w)
            self.dc1 = L.DeconvolutionND(1, 512, 256, 4, 2, 1, initialW=w)
            self.dc2 = L.DeconvolutionND(1, 256, 128, 4, 2, 1, initialW=w)
            self.dc3 = L.DeconvolutionND(1, 128, 128, 4, 2, 1, initialW=w)
            self.dc4 = L.DeconvolutionND(1, 128, z_fast_dim, 4, 2, 1, initialW=w)
            self.bn0 = L.BatchNormalization(512)
            self.bn1 = L.BatchNormalization(256)
            self.bn2 = L.BatchNormalization(128)
            self.bn3 = L.BatchNormalization(128)
        self.z_slow_dim = z_slow_dim
        self.z_fast_dim = z_fast_dim 
开发者ID:pfnet-research,项目名称:tgan,代码行数:17,代码来源:frame_seed_generator.py


注:本文中的chainer.links.DeconvolutionND方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。