Skip to content
Snippets Groups Projects
Commit 73ad3022 authored by s184058's avatar s184058
Browse files

Merge branch 'data' into 'main'

minor change in plot_data variable definition

See merge request !2
parents ea35de0e 10ad3d36
No related branches found
No related tags found
1 merge request!2minor change in plot_data variable definition
...@@ -72,7 +72,7 @@ def grid_overview(data, num_images=7, cmap_im="gray", cmap_segm="viridis", alpha ...@@ -72,7 +72,7 @@ def grid_overview(data, num_images=7, cmap_im="gray", cmap_segm="viridis", alpha
row_titles = ["Input images", "Ground truth segmentation", "Mask"] row_titles = ["Input images", "Ground truth segmentation", "Mask"]
# Make new list such that possible augmentations remain identical for all three rows # Make new list such that possible augmentations remain identical for all three rows
plot_data = list(data[:num_images]) plot_data = [data[idx] for idx in range(num_images)]
fig = plt.figure(figsize=(2 * num_images, 9 if has_mask else 6), constrained_layout=True) fig = plt.figure(figsize=(2 * num_images, 9 if has_mask else 6), constrained_layout=True)
...@@ -168,7 +168,7 @@ def grid_pred( ...@@ -168,7 +168,7 @@ def grid_pred(
model.eval() model.eval()
# Make new list such that possible augmentations remain identical for all three rows # Make new list such that possible augmentations remain identical for all three rows
plot_data = list(data[:num_images]) plot_data = [data[idx] for idx in range(num_images)]
# Create input and target batch # Create input and target batch
inputs = torch.stack([item[0] for item in plot_data], dim=0).to(device) inputs = torch.stack([item[0] for item in plot_data], dim=0).to(device)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment