Skip to content
Snippets Groups Projects
Commit 9c8ba6bb authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

fix remaining bug regarding random search

parent a844b76f
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ def compute_measures(dataset: MuMapDataset, model: UNet) -> pd.DataFrame:
pd.DataFrame
a dataframe containing containing the measures for each image in the dataset
"""
device = next(model.parameters()).device
measures = {"NMAE": nmae, "MSE": mse}
values = pd.DataFrame(dict(map(lambda x: (x, []), measures.keys())))
for i, (recon, mu_map) in enumerate(dataset):
......
......@@ -374,7 +374,7 @@ class RandomSearchCGAN(RandomSearch):
if nmae < self.nmae_min:
self.logger.info(f"New best run at iteration {i}")
self.nmae_min = nmae
self._cleanup_run(i, link_best=(nmae_min == nmae))
self._cleanup_run(i, link_best=(self.nmae_min == nmae))
return self.nmae_min
def eval_run(self):
......
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