Skip to content

Commit

Permalink
Merge pull request #5 from antimora/normalizer-fix
Browse files Browse the repository at this point in the history
Fix model normalizer
  • Loading branch information
nathanielsimard authored Oct 9, 2023
2 parents 5323c22 + 8ef8bfa commit 99be61c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions squeezenet-burn/src/model/normalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ impl<B: Backend> Normalizer<B> {
///
/// The normalization is done according to the following formula:
/// `input = (input - mean) / std`
pub fn normalize(self, input: Tensor<B, 4>) -> Tensor<B, 4> {
input - self.mean / self.std
pub fn normalize(&self, input: Tensor<B, 4>) -> Tensor<B, 4> {
(input - self.mean.clone()) / self.std.clone()
}
}

Expand Down

0 comments on commit 99be61c

Please sign in to comment.