Skip to content

Instantly share code, notes, and snippets.

Created Sep 21, 2020
What would you like to do?
inputs = torch.Tensor(inputs_array)
targets = torch.Tensor(targets_array)
dataset = TensorDataset(inputs, targets)
train_ds, val_ds = random_split(dataset, [228, 57])
batch_size = 128
train_loader = DataLoader(train_ds, batch_size, shuffle=True)
val_loader = DataLoader(val_ds, batch_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment