From fed16abc222e35d3a16959ef630828beb939b791 Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 2 Nov 2020 08:47:18 -0700 Subject: [PATCH] Report chunking errors --- codes/data/multi_frame_dataset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codes/data/multi_frame_dataset.py b/codes/data/multi_frame_dataset.py index 2e9a5627..1dd81477 100644 --- a/codes/data/multi_frame_dataset.py +++ b/codes/data/multi_frame_dataset.py @@ -29,6 +29,9 @@ class MultiFrameDataset(BaseUnsupervisedImageDataset): # Now build num_frames starting from search_idx. hqs, refs, masks, centers = [], [], [], [] for i in range(self.num_frames): + idx = search_idx + i + if idx < 0 or idx >= len(self.chunks) or chunk_offset < 0 or chunk_offset >= len(self.chunks[idx]): + print("Chunk reference indexing failed for %s." % (im_name,), search_idx, i, chunk_offset, self.num_frames) h, r, c, m, p = self.chunks[search_idx + i][chunk_offset] hqs.append(h) refs.append(r)