tilus.Script.squeeze¶
- Script.squeeze(x, *, dim, out=None)[source]¶
Squeeze a dimension of a register tensor with size 1.
- Parameters:
x (RegisterTensor) – The register tensor to squeeze.
dim (int | Sequence[int]) – The dimension(s) to squeeze out. The dimension(s) must have size 1.
out (RegisterTensor, optional) – The register tensor to store the result. If not provided, a new register tensor will be allocated.
- Returns:
ret – The register tensor with the specified dimension squeezed out.
- Return type: