cargo fmt and clippy across the panorama work, and one lint master carried
The dr-face comparison is master's: a negated partial-order test on the eye box's width, rewritten as the two conditions it meant.
This commit is contained in:
@@ -24,7 +24,11 @@ fn main() {
|
||||
};
|
||||
let shape: Vec<usize> = args
|
||||
.next()
|
||||
.map(|s| s.split('x').map(|d| d.parse().expect("dimension")).collect())
|
||||
.map(|s| {
|
||||
s.split('x')
|
||||
.map(|d| d.parse().expect("dimension"))
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_else(|| vec![1, 1, 768, 1024]);
|
||||
|
||||
let bytes = std::fs::read(&path).expect("read model");
|
||||
@@ -32,13 +36,14 @@ fn main() {
|
||||
|
||||
let _ = ort::set_api(ort_tract::api());
|
||||
let t = Instant::now();
|
||||
let mut session = match ort::session::Session::builder().and_then(|mut b| b.commit_from_memory(&bytes)) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
println!("FAIL load: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
let mut session =
|
||||
match ort::session::Session::builder().and_then(|mut b| b.commit_from_memory(&bytes)) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
println!("FAIL load: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
println!("ok loaded in {:?}", t.elapsed());
|
||||
for i in session.inputs().iter() {
|
||||
println!(" input {} {:?}", i.name(), i.dtype());
|
||||
|
||||
Reference in New Issue
Block a user