mlreco.models.layers.common.uresnext module

class mlreco.models.layers.common.uresnext.UResNeXt(cfg, name='uresnext')[source]

Bases: torch.nn.modules.module.Module

UNet Type encoder-decoder network, with atrous convolutions and resnext-type blocks.

__init__(cfg, name='uresnext')[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

__module__ = 'mlreco.models.layers.common.uresnext'
training: bool
encoder(x)[source]

UResNeXt Encoder.

INPUTS:
  • x (SparseTensor): MinkowskiEngine SparseTensor

Returns

dictionary of encoder output with intermediate feature planes:

  1. encoderTensors (list): list of intermediate SparseTensors

2) finalTensor (SparseTensor): feature tensor at deepest layer.

Return type

  • result (dict)

decoder(final, encoderTensors)[source]

UResNeXt Decoder

INPUTS:
  • encoderTensors (list of SparseTensor): output of encoder.

Returns

list of feature tensors in decoding path at each spatial resolution.

Return type

  • decoderTensors (list of SparseTensor)

forward(input)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.