Skip to content

Instantly share code, notes, and snippets.

@franckjay
Created December 30, 2020 23:52
Show Gist options
  • Save franckjay/e3944e6acedef8b0c19f5dc9c394b682 to your computer and use it in GitHub Desktop.
Save franckjay/e3944e6acedef8b0c19f5dc9c394b682 to your computer and use it in GitHub Desktop.
G = sparse.to_dense().t()@sparse.to_dense()
tensor([
[1., 0., 0., 0., 1., 1.],
[0., 1., 1., 1., 0., 0.],
[0., 1., 1., 1., 0., 0.],
[0., 1., 1., 2., 0., 1.],
[1., 0., 0., 0., 1., 1.],
[1., 0., 0., 1., 1., 2.]
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment