Report chunking errors

This commit is contained in:
James Betker 2020-11-02 08:47:18 -07:00
parent bb39d3efe5
commit fed16abc22

View File

@ -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)