# CatTransform Source: https://www.tensorplay.cn/docs/generated/tensorplay.distributions.CatTransform.html ```python class tensorplay.distributions.CatTransform(tseq: Sequence[Transform], dim: int = 0, lengths: Sequence[int] | None = None, cache_size: int = 0) ``` Transform functor that applies a sequence of transforms tseq component-wise to each submatrix at dim, of length lengths[dim], in a way compatible with tensorplay.cat(). Example: ``` x0 = tensorplay.cat([tensorplay.range(1, 10), tensorplay.range(1, 10)], dim=0) x = tensorplay.cat([x0, x0], dim=0) t0 = CatTransform([ExpTransform(), identity_transform], dim=0, lengths=[10, 10]) t = CatTransform([t0, t0], dim=0, lengths=[20, 20]) y = t(x) ``` ```python forward_shape(shape) ``` Infers the shape of the forward computation, given the input shape. Defaults to preserving shape. ```python property inv: Transform ``` Returns the inverse [Transform](/docs/generated/tensorplay.distributions.Transform.html#tensorplay.distributions.Transform) of this transform. This should satisfy t.inv.inv is t. ```python inverse_shape(shape) ``` Infers the shapes of the inverse computation, given the output shape. Defaults to preserving shape. ```python property sign: int ``` Returns the sign of the determinant of the Jacobian, if applicable. In general this only makes sense for bijective transforms.