Skip to content

Instantly share code, notes, and snippets.

@kaniblu
Created August 20, 2020 10:32
Show Gist options
  • Save kaniblu/d1393c8f8c4cc9dfc13cf54c4a33da76 to your computer and use it in GitHub Desktop.
Save kaniblu/d1393c8f8c4cc9dfc13cf54c4a33da76 to your computer and use it in GitHub Desktop.
import torch
torch.mm(torch.randn(3, 4), torch.randn(4, 5)).size() # torch.Size([3, 5])
torch.randn(3, 4).mm(torch.randn(4, 5)).size() # torch.Size([3, 5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment