Closed jiyanbio closed 4 years ago
Hi, @jiyanbio thanks for your interest in our work. Your concern is right while the potential issue you mentioned doesn't exist for this dataset cause the training index is continuous and starting from 0.
{'train': tensor([ 0, 1, 2, ..., 86616, 86617, 86618]),
'valid': tensor([ 86619, 86620, 86621, ..., 107852, 107853, 107854]),
'test': tensor([107855, 107856, 107857, ..., 132531, 132532, 132533])}
Therefore, statement train_y = dataset.y[dataset.train_idx]
and train_y = dataset.y
will produce the same result.
Please let us know if your concern is solved and feel free to ask more questions.
def train(data, dataset, model, optimizer, criterion, device):