Skip to content

Commit

Permalink
Remove useless try_into in rmbg example
Browse files Browse the repository at this point in the history
  • Loading branch information
robertknight committed Sep 6, 2024
1 parent 4702cd9 commit d647dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rten-examples/src/rmbg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let std_dev = [1.0, 1.0, 1.0];
normalize_image(normalized_image.view_mut(), mean, std_dev);

let [_, orig_height, orig_width] = image.shape().try_into()?;
let [_, orig_height, orig_width] = image.shape();

let mut normalized_image = normalized_image.into_dyn();
normalized_image.insert_axis(0); // Add batch dim
Expand Down

0 comments on commit d647dab

Please sign in to comment.