Skip to content

Instantly share code, notes, and snippets.

@vaibhavkumar049
Created May 23, 2019 22:58
Show Gist options
  • Save vaibhavkumar049/6810b8453dc28a9bc00ae0322156059d to your computer and use it in GitHub Desktop.
Save vaibhavkumar049/6810b8453dc28a9bc00ae0322156059d to your computer and use it in GitHub Desktop.
a = np.random.randn(5)
print(a)
a_pt = torch.from_numpy(a)
print(type(a), type(a_pt))
print(a_pt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment