Skip to content

Instantly share code, notes, and snippets.

@Adityanagraj
Created May 29, 2020 03:37
Show Gist options
  • Save Adityanagraj/f7f53b8cc7eff87978dc8f816338bd1c to your computer and use it in GitHub Desktop.
Save Adityanagraj/f7f53b8cc7eff87978dc8f816338bd1c to your computer and use it in GitHub Desktop.
d=torch.ones(5,3)
d.fill_diagonal_(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment