Skip to content

Commit

Permalink
script_model fix for TTA
Browse files Browse the repository at this point in the history
  • Loading branch information
mpelchat04 committed Oct 8, 2024
1 parent dddeafb commit 708c78d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/script_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def forward(self, input):
shape = input.shape
B, C = shape[0], shape[1]
input = (self.max_val - self.min_val) * (input - self.min) / (self.max -self.min) + self.min_val
input = (input.view(B, C, -1) - self.mean) / self.std
input = input.view(shape)
input = (input.reshape(B, C, -1) - self.mean) / self.std
input = input.reshape(shape)
output = self.model_scripted(input.to(self.device))
if self.from_logits:
if self.num_classes == 1:
Expand Down

0 comments on commit 708c78d

Please sign in to comment.