nets.py
def forward(self, x):
        """Wrapper for the forward application of the module.

        This calls self._forward(x) and records the input/output spatial shapes.

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

        out_x = self._forward(x)
        if not self.space_evaluated():
            self._input_spatial_shape['height'] = x.shape[2]
            self._input_spatial_shape['width'] = x.shape[3]
            self._output_spatial_shape['height'] = out_x.shape[2]
            self._output_spatial_shape['width'] = out_x.shape[3]
            self._space_evaluated = True

        return out_x
Wrapper for the forward application of the module.

        This calls self._forward(x) and records the input/output spatial shapes.

        Args:
            x: Tensor with shape [batch, channels, height, width].
        
Wrapper for the forward application of the module.
This calls self._forward(x) and records the input/output spatial shapes.
Wrapper for the forward application of the module . This calls self . _forward ( x ) and records the input / output spatial shapes .
def forward(self, x):
        out_x = self._forward(x)
        if not self.space_evaluated():
            self._input_spatial_shape['height'] = x.shape[2]
            self._input_spatial_shape['width'] = x.shape[3]
            self._output_spatial_shape['height'] = out_x.shape[2]
            self._output_spatial_shape['width'] = out_x.shape[3]
            self._space_evaluated = True
        return out_x
def forward ( self , x ) : out_x = self . _forward ( x ) if not self . space_evaluated ( ) : self . _input_spatial_shape [ 'height' ] = x . shape [ 2 ] self . _input_spatial_shape [ 'width' ] = x . shape [ 3 ] self . _output_spatial_shape [ 'height' ] = out_x . shape [ 2 ] self . _output_spatial_shape [ 'width' ] = out_x . shape [ 3 ] self . _space_evaluated = True return out_x
Wrapper for the forward application of the module.
Wrapper for the forward application of the module .
"""Wrapper for the forward application of the module.

        This calls self._forward(x) and records the input/output spatial shapes.

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