Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed Jan 29, 2024
1 parent 893c9a6 commit f4436e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nnunetv2/inference/predict_from_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ def predict_sliding_window_return_logits(self, input_image: torch.Tensor) \

empty_cache(self.device)

# Autocast is a little bitch.
# Autocast can be annoying
# If the device_type is 'cpu' then it's slow as heck on some CPUs (no auto bfloat16 support detection)
# and needs to be disabled.
# If the device_type is 'mps' then it will complain that mps is not implemented, even if enabled=False
Expand Down
4 changes: 2 additions & 2 deletions nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def train_step(self, batch: dict) -> dict:
target = target.to(self.device, non_blocking=True)

self.optimizer.zero_grad(set_to_none=True)
# Autocast is a little bitch.
# Autocast can be annoying
# If the device_type is 'cpu' then it's slow as heck and needs to be disabled.
# If the device_type is 'mps' then it will complain that mps is not implemented, even if enabled=False is set. Whyyyyyyy. (this is why we don't make use of enabled=False)
# So autocast will only be active if we have a cuda device.
Expand Down Expand Up @@ -945,7 +945,7 @@ def validation_step(self, batch: dict) -> dict:
else:
target = target.to(self.device, non_blocking=True)

# Autocast is a little bitch.
# Autocast can be annoying
# If the device_type is 'cpu' then it's slow as heck and needs to be disabled.
# If the device_type is 'mps' then it will complain that mps is not implemented, even if enabled=False is set. Whyyyyyyy. (this is why we don't make use of enabled=False)
# So autocast will only be active if we have a cuda device.
Expand Down

0 comments on commit f4436e3

Please sign in to comment.