749438fd8b7ffc29e78d042473cb00fda595d937,dataloader.py,,load_dataset,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,13
Before Change
data_num = len(trainset) // data_split
ind_start = data_num*split_idx
ind_end = min(data_num*(split_idx + 1), len(trainset))
train_indices = indices[ind_start:ind_end]
train_sampler = torch.utils.data.sampler.SubsetRandomSampler(train_indices)
train_loader = torch.utils.data.DataLoader(trainset, batch_size=batch_size,
sampler=train_sampler,
shuffle=False, num_workers=threads)
After Change
// Randomly sample indices. Use seed=0 in the generator to make this reproducible
state = np.random.get_state()
np.random.seed(0)
indices = np.random.choice(indices, data_num, replace=False)
np .random.set_state(state)
train_sampler = torch.utils.data.sampler.SubsetRandomSampler(indices)
train_loader = torch.utils.data.DataLoader(trainset, batch_size=batch_size,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: tomgoldstein/loss-landscape
Commit Name: 749438fd8b7ffc29e78d042473cb00fda595d937
Time: 2018-12-27
Author: tomg@cs.umd.edu
File Name: dataloader.py
Class Name:
Method Name: load_dataset
Project Name: tomgoldstein/loss-landscape
Commit Name: 749438fd8b7ffc29e78d042473cb00fda595d937
Time: 2018-12-27
Author: tomg@cs.umd.edu
File Name: dataloader.py
Class Name:
Method Name: load_dataset
Project Name: theislab/scanpy
Commit Name: cd93c5446a236ed76456b188579e671d0619f333
Time: 2017-07-21
Author: f.alex.wolf@gmx.de
File Name: scanpy/preprocessing/simple.py
Class Name:
Method Name: subsample
Project Name: drckf/paysage
Commit Name: 5cf44ce3e9532c0bb7094567bfab89422e33e998
Time: 2017-01-19
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: examples/example_mnist_grbm.py
Class Name:
Method Name: