Skip to main content



rebind(v: Symbol, out_dims: List[Dim]) -> Symbol

Rebinds a symbolic tensor to a specified set of dimensions.

This does not mutate the symbolic tensor passed in, but instead adds a runtime assert that the input symbolic shape is equivalent to out_dims shape. For example, if the input tensor shape has dynamic/unknown sizes, this will assert a fixed sizes that may be required for a subsequent operation.


  • v (Symbol): The input symbolic tensor to rebind.
  • out_dims (List[Dim]): The symbolic shape to assert for v, as a list of Dim values.


A symbolic tensor with the same elements and shape as the given tensor, but with the symbolic shape asserted to out_dims.