mirror of
https://github.com/cheikh2shift/godex.git
synced 2026-10-21 10:40:08 -05:00
refactor: update model input handling in main function
This commit is contained in:
1 parent
2ca3ff1a5f
commit
891a36f098
1 file changed
+2
-2
@@ -1,5 +1,5 @@
|
||||
use anyhow::{bail, Context, Result};
|
||||
use image::{imageops::FilterType, GenericImageView};
|
||||
use image::imageops::FilterType;
|
||||
use ndarray::Array4;
|
||||
use serde::Serialize;
|
||||
use std::env;
|
||||
@@ -41,7 +41,7 @@ fn main() -> Result<()> {
|
||||
.into_optimized()?
|
||||
.into_runnable()?;
|
||||
|
||||
let result = model.run(tvec!(input.into()))?;
|
||||
let result = model.run(tvec!(Tensor::from(input)))?;
|
||||
let scores = result[0].to_array_view::<f32>()?;
|
||||
let scores = scores.iter().cloned().collect::<Vec<f32>>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user