Commit ebc684ba authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Remove NaN masking.

parent e3580c71
...@@ -1334,9 +1334,7 @@ class NetworkTrainer(BaseConfig): ...@@ -1334,9 +1334,7 @@ class NetworkTrainer(BaseConfig):
if self.classification: if self.classification:
val_loss = self.loss_function(outputs, labels.long()) val_loss = self.loss_function(outputs, labels.long())
else: else:
# exclude potentially missing values val_loss = self.loss_function(outputs, labels)
mask = ~torch.isnan(labels)
val_loss = self.loss_function(outputs[mask], labels[mask])
loss.append(val_loss.item()) loss.append(val_loss.item())
# calculate predicted class labels # calculate predicted class labels
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment