Skip to main content

Module tensor

Module tensor 

Source
Expand description

Tensor + Scalar abstractions. The framework crate ships no concrete tensor type; backends implement these traits over their own storage of choice.

  • Scalar - every scalar projects to f32 for cross-backend interop. Framework ships universal impls for f32 + f64; backends add others.
  • Tensor - the contract every backend’s concrete tensor type implements: shape + total length + canonical ONNX TensorProto round-trip.

Enums§

TensorSerializationError
Errors surfaced by Tensor::from_proto.

Traits§

Scalar
A scalar value usable in tensors. Every scalar projects to f32 for cross-backend interop.
Tensor
The contract every backend’s concrete tensor type implements.