pub fn try_burn_to_tenferro<B: Backend<FloatElem = f64>>(
tensor: FloatTensor<B>,
) -> Result<Tensor<f64>>Expand description
Fallibly convert a Burn backend tensor primitive into a tenferro
Tensor<f64>.
Burn tensors are treated as row-major boundary values. The canonical bridge normalizes them into tenferro’s internal column-major tensor layout before returning.
§Current Limitations
This function currently supports only Burn backends whose float element
type is f64. Support for other element types (e.g., f32) will be added
in future versions.
§Examples
ⓘ
use burn::backend::NdArray;
use tenferro_ext_burn::convert::try_burn_to_tenferro;
let burn_prim: <NdArray<f64> as burn::tensor::backend::Backend>::FloatTensorPrimitive =
todo!();
let tenferro_t = try_burn_to_tenferro::<NdArray<f64>>(burn_prim).unwrap();