nets.py
def _forward(self, x):
        """Forward application of the module.

        Args:
            x: Tensor with shape [batch, channels, height, width].

        Returns:
            out_x: Output tensor with shape
                [batch, self._out_channels, output_height, output_width].
        """
        padded_x = self._padding_module.forward(x)

        if not self.space_evaluated():
            # Evaluate remainder. Remainder is the spatial border that is
            # ignored by the convolution. If stride is 1 then the remainder must
            # be zero. The remainder may also be zero when stride is not 1,
            # depending on the stride, padding, and input spatial shape.
            # Recording this remainder is useful when constructing a
            # deconvolutional layer symmetric to this convolutional layer.
            height = padded_x.shape[2]
            width = padded_x.shape[3]
            remainder_height = (
                (height - self._kernel_size[0]) % self._stride[0])
            remainder_width = (
                (width - self._kernel_size[1]) % self._stride[1])
            self._remainder['height'] = remainder_height
            self._remainder['width'] = remainder_width

        return self.layer(padded_x)
Forward application of the module.

        Args:
            x: Tensor with shape [batch, channels, height, width].

        Returns:
            out_x: Output tensor with shape
                [batch, self._out_channels, output_height, output_width].
        
Forward application of the module.
Forward application of the module .
def _forward(self, x):
        padded_x = self._padding_module.forward(x)
        if not self.space_evaluated():
            height = padded_x.shape[2]
            width = padded_x.shape[3]
            remainder_height = (
                (height - self._kernel_size[0]) % self._stride[0])
            remainder_width = (
                (width - self._kernel_size[1]) % self._stride[1])
            self._remainder['height'] = remainder_height
            self._remainder['width'] = remainder_width
        return self.layer(padded_x)
def _forward ( self , x ) : padded_x = self . _padding_module . forward ( x ) if not self . space_evaluated ( ) : height = padded_x . shape [ 2 ] width = padded_x . shape [ 3 ] remainder_height = ( ( height - self . _kernel_size [ 0 ] ) % self . _stride [ 0 ] ) remainder_width = ( ( width - self . _kernel_size [ 1 ] ) % self . _stride [ 1 ] ) self . _remainder [ 'height' ] = remainder_height self . _remainder [ 'width' ] = remainder_width return self . layer ( padded_x )
Forward application of the module.
Forward application of the module .
"""Forward application of the module.

        Args:
            x: Tensor with shape [batch, channels, height, width].

        Returns:
            out_x: Output tensor with shape
                [batch, self._out_channels, output_height, output_width].
        """ # Evaluate remainder. Remainder is the spatial border that is # ignored by the convolution. If stride is 1 then the remainder must # be zero. The remainder may also be zero when stride is not 1, # depending on the stride, padding, and input spatial shape. # Recording this remainder is useful when constructing a # deconvolutional layer symmetric to this convolutional layer.
Output tensor with shape
[batch, self._out_channels, output_height, output_width].
Output tensor with shape [ batch self . _out_channels output_height output_width ] .
out_x
self
x
Tensor with shape [batch, channels, height, width].
Tensor with shape [ batch channels height width ] .