emmi.pipeline.sample_processors.position_normalization

Classes

PositionNormalizationSampleProcessor

Pre-processes data on a sample-level to normalize positions.

Module Contents

class emmi.pipeline.sample_processors.position_normalization.PositionNormalizationSampleProcessor(items, raw_pos_min, raw_pos_max, scale=1000)

Bases: ksuit.data.pipeline.SampleProcessor

Pre-processes data on a sample-level to normalize positions.

Parameters:
items
scale = 1000
raw_pos_min_tensor
raw_pos_max_tensor
raw_size
inverse(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)