Skip to content
Snippets Groups Projects
Commit ea5324c4 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files
parents ee8b2a6e 9b9ef09f
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
......@@ -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 + 50.0 * loss_g_l1
loss_g = loss_g_adv + 20.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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment