Module tensor

Module tensor 

Source

Functionsยง

element_count
Return the total number of elements for a given shape.
is_scalar_tensor
Return true when a tensor contains exactly one scalar element.
logical_to_tensor
Convert a logical array (0/1 bytes) into a numeric tensor.
ones
Construct an one-filled tensor with the provided shape.
ones_with_dtype
Construct a one-filled tensor with an explicit dtype flag.
parse_dimension
Convert an argument into a dimension index (1-based) if possible.
tensor_into_value
Convert a Tensor back into a runtime value.
value_into_tensor
Convert a Value into an owned Tensor, defaulting error messages to "sum".
value_into_tensor_for
Convert a Value into a tensor while customising the builtin name in error messages.
value_to_string
Attempt to extract a string from a runtime value.
value_to_tensor
Clone a Value and coerce it into a tensor.
zeros
Construct a zero-filled tensor with the provided shape.
zeros_with_dtype
Construct a zero-filled tensor with an explicit dtype flag.