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
Andrei-Claudiu Roibu
BrainMapper
Commits
b1633c87
Commit
b1633c87
authored
Jul 13, 2020
by
Andrei Roibu
Browse files
deleted print functions
parent
9a088f2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
solver.py
View file @
b1633c87
...
...
@@ -188,9 +188,6 @@ class Solver():
# We add an extra dimension (~ number of channels) for the 3D convolutions.
X
=
torch
.
unsqueeze
(
X
,
dim
=
1
)
y
=
torch
.
unsqueeze
(
y
,
dim
=
1
)
print
(
'X range:'
,
torch
.
min
(
X
),
torch
.
max
(
X
))
print
(
'y range:'
,
torch
.
min
(
y
),
torch
.
max
(
y
))
MNI152_T1_2mm_brain_mask
=
torch
.
unsqueeze
(
torch
.
unsqueeze
(
self
.
MNI152_T1_2mm_brain_mask
,
dim
=
0
),
dim
=
0
)
...
...
@@ -202,12 +199,8 @@ class Solver():
y_hat
=
model
(
X
)
# Forward pass & Masking
print
(
'y_hat range:'
,
torch
.
min
(
y_hat
),
torch
.
max
(
y_hat
))
y_hat
=
torch
.
mul
(
y_hat
,
MNI152_T1_2mm_brain_mask
)
print
(
'y_hat masked range:'
,
torch
.
min
(
y_hat
),
torch
.
max
(
y_hat
))
loss
=
self
.
loss_function
(
y_hat
,
y
)
# Loss computation
if
phase
==
'train'
:
...
...
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