Skip to content

Commit

Permalink
fix: Put the output tensor to u8
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Oct 1, 2024
1 parent 9bff118 commit db9136f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn main() -> anyhow::Result<()> {
interpreter.run_session(&session)?;
let outputs = interpreter.outputs(&session);
outputs.iter().for_each(|x| {
let tensor = x.tensor::<u8>().expect("No tensor");
let tensor = x.tensor::<f32>().expect("No tensor");
time!(tensor.wait(ffi::MapType::MAP_TENSOR_READ, true); format!("Waiting for tensor: {}", x.name()));
println!("{}: {:?}", x.name(), tensor.shape());
let _ = tensor.create_host_tensor_from_device(true);
Expand Down

0 comments on commit db9136f

Please sign in to comment.