-
Notifications
You must be signed in to change notification settings - Fork 205
make_indices error #69
Open
Description
Hi, all respect to your fantastic work,. However, it seems that there is a bug in your code, specifically, in /diffuser/diffuser/datasets/sequence.py line 57, the definition of function make_indices:
def make_indices(self, path_lengths, horizon): ''' makes indices for sampling from dataset; each index maps to a datapoint ''' indices = [] for i, path_length in enumerate(path_lengths): max_start = min(path_length - 1, self.max_path_length - horizon) if not self.use_padding: max_start = min(max_start, path_length - horizon) for start in range(max_start): end = start + horizon indices.append((i, start, end)) indices = np.array(indices) return indices
say we have a path with path_length = 34 and path_length - 1 < self.max_path_length - horizon, the max_start would be 33 so as for for start in range(max_start), the start would be in [0, 32], which means that the final timestep with index 33 can't be reached.
Hope you can fix it, and thanks a lot.
Best Regards!
Metadata
Metadata
Assignees
Labels
No labels