noether.data.pipeline.batch_processors.position_normalization¶
Classes¶
Post-processes data on a batch-level to normalize positions. |
Module Contents¶
- class noether.data.pipeline.batch_processors.position_normalization.PositionNormalizationBatchProcessor(items, raw_pos_min, raw_pos_max, scale=1000)¶
Bases:
noether.data.pipeline.batch_processor.BatchProcessorPost-processes data on a batch-level to normalize positions.
- Parameters:
items (list[str]) – The position items (i.e., keys in the batch) to normalize.
raw_pos_min (collections.abc.Sequence[float]) – The minimum position in the source domain.
raw_pos_max (collections.abc.Sequence[float]) – The maximum position in the source domain.
scale (int | float) – The maximum value of the position. Defaults to 1000.
- 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)