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
Istvan N. Huszar, MD
tirl
Commits
710a658a
Commit
710a658a
authored
Aug 14, 2020
by
inhuszar
Browse files
Cost normalisation by non-zero mask area.
parent
78dc0c0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tirl/costs/msd.py
View file @
710a658a
...
...
@@ -154,7 +154,7 @@ class CostMSD(Cost):
if
combined_mask
is
not
None
:
costs
=
costs
*
combined_mask
[
nonzero
]
if
self
.
metaparameters
.
get
(
"normalise"
):
return
np
.
sum
(
costs
)
/
stensors
.
shape
[
-
1
]
return
np
.
sum
(
costs
)
/
np
.
count_nonzero
(
nonzero
)
# mod 13 Aug 2020
else
:
return
np
.
sum
(
costs
)
...
...
Write
Preview
Supports
Markdown
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