mlreco.models.layers.common.extract_feature_map module

class mlreco.models.layers.common.extract_feature_map.MinkGhostMask(data_dim)[source]

Bases: torch.nn.modules.module.Module

Ghost mask downsampler for MinkowskiEngine Backend

__init__(data_dim)[source]

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

forward(ghost_mask, premask_tensor)[source]

Downsamples the ghost mask and prunes premask_tensor with current ghost mask to obtain nonghost tensor and new ghost mask.

Inputs:
  • ghost_mask (ME.SparseTensor): current resolution ghost mask

  • premask_tensor (ME.SparseTensor): current resolution feature map

to be pruned

Returns

2x2 downsampled ghost mask - downsampled_tensor (ME.SparseTensor): 2x2 downsampled feature map

Return type

  • downsampled_mask (ME.SparseTensor)

__module__ = 'mlreco.models.layers.common.extract_feature_map'
training: bool