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 dilated_convolution_2d.dilated_convolution_2d( x, self.W_bar, self.b, self.stride, self.pad, self.dilate)
def forward(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 dilated_convolution_2d.dilated_convolution_2d( x, self.W, self.b, self.stride, self.pad, self.dilate)
def __call__(self, x): """Applies the convolution layer. Args: x (~chainer.Variable): Input image. Returns: ~chainer.Variable: Output of the convolution. """ if self.has_uninitialized_params: with cuda.get_device(self._device_id): self._initialize_params(x.shape[1]) return dilated_convolution_2d.dilated_convolution_2d( x, self.W, self.b, self.stride, self.pad, self.dilate, self.use_cudnn)
def __call__(self, x): """Applies the convolution layer. Args: x (~chainer.Variable): Input image. Returns: ~chainer.Variable: Output of the convolution. """ if self.has_uninitialized_params: with cuda.get_device(self._device_id): self._initialize_params(x.shape[1]) return dilated_convolution_2d.dilated_convolution_2d( x, self.W, self.b, self.stride, self.pad, self.dilate, self.use_cudnn)