medium10 pts · first answer countspytorchtensor-shapes
Shape after a batched matmul
What does this code print?
import torch a = torch.randn(8, 10, 64) w = torch.randn(64, 32) print((a @ w).shape)
Discussion 0
Join free to post in the discussion.
Related questions
- Dropout after eval()Machine Learning Engineer
- Parameters in nn.Linear(10, 5)Machine Learning Engineer
- Telling autograd to track a tensorMachine Learning Engineer
- Why wrap inference in no_gradMachine Learning Engineer
- Logging loss without leaking memoryMachine Learning Engineer
- Feeding a single image to a CNNMachine Learning Engineer
- Tensors on different devicesMachine Learning Engineer
- model(x) versus model.forward(x)Machine Learning Engineer