Skip to content
Snippets Groups Projects
Commit a0a295d2 authored by zhuoyiyang's avatar zhuoyiyang
Browse files

fix out range bug

parent 16378f14
Branches
Tags
No related merge requests found
...@@ -298,6 +298,7 @@ class BlockedRandomSplitDataset(data.Dataset): ...@@ -298,6 +298,7 @@ class BlockedRandomSplitDataset(data.Dataset):
def __init__(self, ds, indices, block_size,**kwargs): def __init__(self, ds, indices, block_size,**kwargs):
if type(indices) is not np.ndarray: if type(indices) is not np.ndarray:
indices = np.array(indices) indices = np.array(indices)
indices = np.sort(indices)
self.block_size = block_size self.block_size = block_size
self.wrapped_data = ds self.wrapped_data = ds
self.wrapped_data_len = len(ds) self.wrapped_data_len = len(ds)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment