emmi.pipeline.batch_processors.position_normalization

Classes

PositionNormalizationBatchProcessor

Post-processes data on a batch-level to normalize positions.

Module Contents

class emmi.pipeline.batch_processors.position_normalization.PositionNormalizationBatchProcessor(items, raw_pos_min, raw_pos_max, scale=1000)

Bases: ksuit.data.pipeline.BatchProcessor

Post-processes data on a batch-level to normalize positions.

Initializes the PositionNormalizationPostCollator

Parameters:
items
scale = 1000
raw_pos_min_tensor
raw_pos_max_tensor
raw_size
denormalize(key, value)

Inverts the normalization from the __call__ method of a single item in the batch.

Parameters:
  • key (str) – The name of the item.

  • value (torch.Tensor) – The value of the item.

Returns:

The same name and the denormalized value.

Return type:

(key, value)