Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
earth_observation_public
PySegCNN
Commits
ebc684ba
Commit
ebc684ba
authored
Jul 23, 2021
by
Frisinghelli Daniel
Browse files
Remove NaN masking.
parent
e3580c71
Changes
1
Hide whitespace changes
Inline
Side-by-side
pysegcnn/core/trainer.py
View file @
ebc684ba
...
...
@@ -1334,9 +1334,7 @@ class NetworkTrainer(BaseConfig):
if
self
.
classification
:
val_loss
=
self
.
loss_function
(
outputs
,
labels
.
long
())
else
:
# exclude potentially missing values
mask
=
~
torch
.
isnan
(
labels
)
val_loss
=
self
.
loss_function
(
outputs
[
mask
],
labels
[
mask
])
val_loss
=
self
.
loss_function
(
outputs
,
labels
)
loss
.
append
(
val_loss
.
item
())
# calculate predicted class labels
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment