Created
November 16, 2018 13:46
-
-
Save dragonflowerai/f2adef1b40a789ff83cbf378ba9020b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_by_idx(self, valid_idx:Collection[int])->'ItemLists': | |
"Split the data according to the indexes in `valid_idx`." | |
train_idx = list(set(np.arange(len(self.items)))-set(valid_idx)) | |
return self.split_by_idxs(train_idx, valid_idx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment