Skip to content

Commit

Permalink
Fix some mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxbotix committed Jun 29, 2024
1 parent 6aad19a commit 375aec3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/object_detection/src/pose_detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ impl PoseDetection {

let mut infer_request = self.network.create_infer_request()?;
let mut tensor = Tensor::new(ElementType::F32, &self.network.get_input()?.get_shape()?)?;

tensor
.buffer_mut()?
.get_raw_data_mut()?
.copy_from_slice(self.scratchpad.as_bytes());

infer_request.set_input_tensor(&tensor)?;
Expand All @@ -169,7 +170,7 @@ impl PoseDetection {
.expect("time ran backwards")
});
}
let mut prediction = infer_request.get_output_tensor()?;
let prediction = infer_request.get_output_tensor()?;
let prediction =
ArrayView::from_shape((56, MAX_DETECTIONS), prediction.get_data::<f32>()?)?;

Expand Down

0 comments on commit 375aec3

Please sign in to comment.