Mojo function
cast
cast(v: Symbol, dtype: DType) -> Symbol
Casts a symbolic tensor to a different data type.
Args:
- v (
Symbol
): The input tensor to cast. - dtype (
DType
): The target dtype to which the tensor is cast.
Returns:
A new symbolic tensor with the same shape as the input and the specified dtype.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!