models.modules.Return

models.modules.Return#

class Return[source]#

Bases: LayerGen

Generator of layers for storing forward pass values

It is intended for use in feature pyramids, where you need to get multiple matrices from different places in the network.

Uses Storage module.

Methods

get

Initializes and returns the network layer

Attributes

get(in_channels: int) Tuple[Module, int][source]#

Initializes and returns the network layer

Parameters:

in_channels (int) – Number of input channels.

Returns:

The generated module and the number of channels that will be after applying this layer to a tensor with in_channels channels.

Return type:

Tuple[nn.Module, int]

out_channels: int#