コード例 #1
0
    def __call__(self, x, W=None, b=None):
        if self.has_uninitialized_params:
            with cuda.get_device(self._device_id):
                self._initialize_params(x.shape[1])

        if W is not None:
            return deconvolution_2d.deconvolution_2d(
                x,
                W,
                b,
                self.stride,
                self.pad,
                self.outsize,
                self.use_cudnn,
                deterministic=self.deterministic)

        return deconvolution_2d.deconvolution_2d(
            x,
            self.W,
            self.b,
            self.stride,
            self.pad,
            self.outsize,
            self.use_cudnn,
            deterministic=self.deterministic)
コード例 #2
0
ファイル: deconvolution.py プロジェクト: kzky/works
    def __call__(self, x, W=None, b=None):
        if self.has_uninitialized_params:
            with cuda.get_device(self._device_id):
                self._initialize_params(x.shape[1])

        if W is not None:
            return deconvolution_2d.deconvolution_2d(
                x, W, b, self.stride, self.pad,
                self.outsize, self.use_cudnn,
                deterministic=self.deterministic)

        return deconvolution_2d.deconvolution_2d(
            x, self.W, self.b, self.stride, self.pad,
            self.outsize, self.use_cudnn,
            deterministic=self.deterministic)
コード例 #3
0
 def __call__(self, x):
     if self.W.data is None:
         self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(x,
                                              self.W_bar,
                                              self.b,
                                              self.stride,
                                              self.pad,
                                              groups=self.groups)
コード例 #4
0
ファイル: deconvolution_2d.py プロジェクト: tsuchm/chainer
 def __call__(self, x):
     return deconvolution_2d.deconvolution_2d(
         x,
         self.W,
         self.b,
         self.stride,
         self.pad,
         self.outsize,
         self.use_cudnn,
         deterministic=self.deterministic)
コード例 #5
0
ファイル: deconvolution_2d.py プロジェクト: km-t/dcpython
 def forward(self, x):
     if self.W.array is None:
         self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(x,
                                              self.W,
                                              self.b,
                                              self.stride,
                                              self.pad,
                                              self.outsize,
                                              groups=self.groups)
コード例 #6
0
 def __call__(self, x):
     """Applies the convolution layer.
     Args:
         x (~chainer.Variable): Input image.
     Returns:
         ~chainer.Variable: Output of the convolution.
     """
     if self.W.data is None:
         self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(x, self.W_bar, self.b,
                                              self.stride, self.pad)
コード例 #7
0
 def __call__(self, x):
     if self.has_uninitialized_params:
         with cuda.get_device_from_id(self._device_id):
             self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(
         x,
         self.W,
         self.b,
         self.stride,
         self.pad,
         self.outsize,
         self.use_cudnn,
         deterministic=self.deterministic)
コード例 #8
0
ファイル: deconvolution_2d.py プロジェクト: fukatani/chainer
 def __call__(self, x):
     if self.W.data is None:
         self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(
         x, self.W, self.b, self.stride, self.pad, self.outsize,
         group=self.group)
コード例 #9
0
ファイル: deconvolution_2d.py プロジェクト: BRETT71/chainer
 def __call__(self, x):
     return deconvolution_2d.deconvolution_2d(
         x, self.W, self.b, self.stride, self.pad,
         self.outsize, self.use_cudnn)
コード例 #10
0
ファイル: deconvolution_2d.py プロジェクト: asi1024/chainer
 def forward(self, x):
     if self.W.array is None:
         self._initialize_params(x.shape[1])
     return deconvolution_2d.deconvolution_2d(
         x, self.W, self.b, self.stride, self.pad, self.outsize,
         dilate=self.dilate, groups=self.groups)