sponge.function.get_length

View Source On Gitee
sponge.function.get_length(length: Union[Length, float], unit: Union[str, Units] = None)[source]

Get the tensor of length in specific unit

Parameters
  • length (Union[Length, float]) – Length value.

  • unit (Union[str, Units], optional) – Length unit. Default: None.

Returns

Float, a tensor of length in specific unit.