Skip to content

Instantly share code, notes, and snippets.

@franckjay
Created December 31, 2020 00:14
Show Gist options
  • Save franckjay/74135a7f2cebf9285f324a94e1fc0609 to your computer and use it in GitHub Desktop.
Save franckjay/74135a7f2cebf9285f324a94e1fc0609 to your computer and use it in GitHub Desktop.
# Take our first user:
sparse.to_dense()[0]
>> tensor([1., 0., 0., 0., 1., 1.])
# Then multiply by B:
sparse.to_dense()[0]@B
>> tensor([ 0.9660, -0.0065, -0.0065, 0.0227, 0.9660, 0.9756])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment