mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
feat: add back usize constructors for Shape, ref #370
This commit is contained in:
@@ -79,14 +79,14 @@ fn main() -> ort::Result<()> {
|
||||
.commit_from_file("tests/data/custom_op_test.onnx")?;
|
||||
|
||||
let allocator = session.allocator();
|
||||
let mut value1 = Tensor::<f32>::new(allocator, [3, 5])?;
|
||||
let mut value1 = Tensor::<f32>::new(allocator, [3_usize, 5])?;
|
||||
{
|
||||
let (_, data) = value1.extract_tensor_mut();
|
||||
for datum in data {
|
||||
*datum = 0.;
|
||||
}
|
||||
}
|
||||
let mut value2 = Tensor::<f32>::new(allocator, [3, 5])?;
|
||||
let mut value2 = Tensor::<f32>::new(allocator, [3_usize, 5])?;
|
||||
{
|
||||
let (_, data) = value2.extract_tensor_mut();
|
||||
for datum in data {
|
||||
|
||||
Reference in New Issue
Block a user