Error for tensor dtype incompatibilities.
Provides information about expected vs actual dtypes and suggestions for converting between types.
Examples
iex> error = %SnakeBridge.Error.DtypeMismatchError{
...> expected: :float32,
...> got: :float64,
...> operation: :matmul,
...> message: "Expected float32 but got float64"
...> }
iex> Exception.message(error)
"Dtype mismatch in matmul..."
Summary
Functions
Generates a suggestion for converting between dtypes.
Creates a DtypeMismatchError error with conversion suggestion.
Types
@type dtype() :: :float16 | :float32 | :float64 | :int32 | :int64 | :bool | atom()