Skip to content

Instantly share code, notes, and snippets.

@danielcwq
Created November 28, 2021 07:43
Show Gist options
  • Save danielcwq/4903b689bd55ca766c37a62639f8d0aa to your computer and use it in GitHub Desktop.
Save danielcwq/4903b689bd55ca766c37a62639f8d0aa to your computer and use it in GitHub Desktop.
valid_x = torch.cat([valid_2_tens, valid_9_tens]).view(-1, 28*28)
valid_y = tensor([1]*len(valid_2_tens) +[0]*len(valid_9_tens)).unsqueeze(1)
valid_dset = list(zip(valid_x,valid_y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment