use ort::session::Session; use ndarray::Array4; fn main() { let empty_array = Array4::::zeros((1, 8, 0, 64)); println!("Created ndarray: {:?}", empty_array.shape()); let tensor_res = ort::value::Tensor::from_array(empty_array); match tensor_res { Ok(_) => println!("Successfully created ort Tensor from ndarray!"), Err(e) => println!("Error from ndarray: {:?}", e), } let tuple_res = ort::value::Tensor::from_array((vec![1, 8, 0, 64], vec![0.0f32; 0])); match tuple_res { Ok(_) => println!("Successfully created ort Tensor from tuple!"), Err(e) => println!("Error from tuple: {:?}", e), } }