From f4436e3a1846637be085f698b19553a70f81357f Mon Sep 17 00:00:00 2001 From: Fabian Isensee Date: Mon, 29 Jan 2024 13:15:39 +0100 Subject: [PATCH] update comments --- nnunetv2/inference/predict_from_raw_data.py | 2 +- nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nnunetv2/inference/predict_from_raw_data.py b/nnunetv2/inference/predict_from_raw_data.py index cfc9e9c85..790e98007 100644 --- a/nnunetv2/inference/predict_from_raw_data.py +++ b/nnunetv2/inference/predict_from_raw_data.py @@ -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 diff --git a/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py b/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py index 690a15fb2..45948daac 100644 --- a/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py +++ b/nnunetv2/training/nnUNetTrainer/nnUNetTrainer.py @@ -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. @@ -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.