Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mu-map
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamino Huxohl
mu-map
Commits
9b9ef09f
Commit
9b9ef09f
authored
2 years ago
by
Tamino Huxohl
Browse files
Options
Downloads
Patches
Plain Diff
adapt params of cgan training and measures script uses args correctly
parent
c6ae15cb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mu_map/eval/measures.py
+3
-1
3 additions, 1 deletion
mu_map/eval/measures.py
mu_map/training/cgan.py
+7
-1
7 additions, 1 deletion
mu_map/training/cgan.py
with
10 additions
and
2 deletions
mu_map/eval/measures.py
+
3
−
1
View file @
9b9ef09f
...
...
@@ -42,6 +42,7 @@ if __name__ == "__main__":
help
=
"
the model weights which should be scored
"
,
)
parser
.
add_argument
(
"
--out
"
,
type
=
str
,
help
=
"
write results as a csv file
"
)
parser
.
add_argument
(
"
--scatter_corrected
"
,
action
=
"
store_true
"
)
parser
.
add_argument
(
"
--dataset_dir
"
,
...
...
@@ -88,9 +89,10 @@ if __name__ == "__main__":
]
)
dataset
=
MuMapDataset
(
"
data/initial/
"
,
args
.
dataset_dir
,
transform_normalization
=
transform_normalization
,
split_name
=
args
.
split
,
scatter_correction
=
args
.
scatter_corrected
,
)
measures
=
{
"
NMAE
"
:
nmae
,
"
MSE
"
:
mse
}
...
...
This diff is collapsed.
Click to expand it.
mu_map/training/cgan.py
+
7
−
1
View file @
9b9ef09f
...
...
@@ -194,7 +194,7 @@ class cGANTraining:
outputs_d_fake
=
self
.
discriminator
(
inputs_d_fake
)
loss_g_adv
=
self
.
criterion_d
(
outputs_d_fake
,
labels_real
)
loss_g_l1
=
self
.
criterion_l1
(
mu_maps_fake
,
mu_maps_real
)
loss_g
=
loss_g_adv
+
5
0.0
*
loss_g_l1
loss_g
=
loss_g_adv
+
2
0.0
*
loss_g_l1
loss_g
.
backward
()
self
.
optimizer_g
.
step
()
...
...
@@ -308,6 +308,11 @@ if __name__ == "__main__":
action
=
"
store_true
"
,
help
=
"
do not shuffle patches in the dataset
"
,
)
parser
.
add_argument
(
"
scatter_correction
"
,
action
=
"
store_true
"
,
help
=
"
use the scatter corrected reconstructions in the dataset
"
,
)
# Training Args
parser
.
add_argument
(
...
...
@@ -450,6 +455,7 @@ if __name__ == "__main__":
shuffle
=
not
args
.
no_shuffle
,
split_name
=
split
,
transform_normalization
=
transform_normalization
,
scatter_correction
=
args
.
scatter_correction
,
logger
=
logger
,
)
data_loader
=
torch
.
utils
.
data
.
DataLoader
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment