spyrit.core.prep.Rerange
- class spyrit.core.prep.Rerange(input_range: tuple | list, output_range: tuple | list)[source]
Bases:
ModuleApplies the affine transform that maps \([x,y]\) to \([a,b]\).
- Args:
input_range (tuple): The input range \([x,y]\).
output_range (tuple): The output range \([a,b]\).
- Attributes:
input_range (tuple): The input range \([x,y]\).
output_range (tuple): The output range \([a,b]\).
Methods
backward(x)Applies the inverse affine transform to the input tensor.
forward(x)Applies the affine transform to the input tensor.
inverse()Returns a different instance of the same class with the input and output ranges swapped.