class
StackTransform
extends
TransformStackTransform(transforms: list[Transform], dim: int = 0)Apply a list of transforms to indexed slices along a stack axis.
The -th transform is applied to the -th slice
obtained by Tensor.unbind along dim, and the results
are stacked back along the same axis. This is the heterogeneous
counterpart of IndependentTransform: different bijections
can be applied to different coordinates of an event vector.
Parameters
transformslist[Transform]One transform per slice. Must be non-empty and the same length
as
x.shape[dim].dimint= 0Dimension along which to slice. Default
0.Raises
ValueErrorIf
transforms is empty, or if the size of dim does not
match len(transforms) at call time.