Skip to content

Commit

Permalink
Commented out code that raises ValueError for NaN in predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Jan 31, 2024
1 parent 29a5dd1 commit bc0fbd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def cpu_call(self, original_image: np.ndarray):
with torch.autocast(device_type=self.cfg.MODEL.DEVICE, enabled=self.cfg.MODEL.AUTOCAST):
predictions = self.model([inputs])[0]

if torch.isnan(predictions["sem_seg"]).any():
raise ValueError("NaN in predictions")
# if torch.isnan(predictions["sem_seg"]).any():
# raise ValueError("NaN in predictions")

return predictions, height, width

Expand Down

0 comments on commit bc0fbd4

Please sign in to comment.