PyTorch Operations For Basic Math Functions
torch.matmul()` can multiply tensors of different dimensions using matrix multiplication or dot product.
Buy Me a Coffee☕ *Memos: My post explains Matrix and Element-wise multiplication in PyTorch. My post explains Dot and Matrix-vector multiplication in PyTorch. My post explains matmul() and dot() My post explains mv(), mm() and bmm(). My post explains add(). My post explains sub() and mul(). My post explains div(). My post explains remainder() and fmod(). <Dot multiplication> dot() can multiply 1D tensors: import torch tensor1 = torch.tensor([2, 7, 4]) # 1D tensor tensor2 = torch.tensor([6, 3, 5]) # 1D tensor torch.dot(tensor1, tensor2) tensor1.dot(tensor2) # tensor(53)...