1, corresponding point multiplication, x.ul (y), that is, dot product operation, dot product does not sum operation, also known as Hadamard product; The dot product and the sum is the convolution
>>> a = torch.Tensor([[1,2], [3,4], [5, 6]])
>>> a
tensor([[1., 2.],
[3., 4.],
[5., 6.]])
>>> a.mul(a)
tensor([[ 1., 4.],
[ 9., 16.],
[25., 36.]])
# a*a等价于a.mul(a)
2, matrix multiplication, x.m m (y), the matrix size to meet: (I, n) x (n, j) strong> p>
>>> a
tensor([[1., 2.],
[3., 4.],
[5., 6.]])
>>> b = a.t() # 转置
>>> b
tensor([[1., 3., 5.],
[2., 4., 6.]])
>>> a.mm(b)
tensor([[ 5., 11., 17.],
[11., 25., 39.],
[17., 39., 61.]])
p>
div>
Read More:
- Latex point multiplication, cross multiplication and division
- The sparse matrix of R language is too large to be used as.matrix
- Matlab matrix transpose function
- Modification scheme of binary files in dot matrix font library
- Python memoryerror (initializing a large matrix)
- Memory error in Python numpy matrix
- download (‘point’) False
- PyTorch CUDA error: an illegal memory access was encountered
- PyTorch – AttributeError: ‘bool‘ object has no attribute ‘sum‘
- An error occurred when installing pytorch version 1.7 GPU
- Keil5 compiler error: runtime error R6002 – floating point support not loaded
- Pytorch — nn.Sequential () module
- Matlab delete row or col to delete the row or column of the matrix
- error: Eigen does not name a type Eigen::Matrix
- Undefined symbol: cblas appears after installing pytorch1.0.0_ sgemm_ Alloc error
- Convex hull detection and convex hull vertex solution of PCL point cloud Library
- How to Fix Tomcat Error: Failed to destroy end point associated with ProtocolHandler[ajp-nio-8009]
- pytorch raise RuntimeError(‘Error(s) in loading state_dict for {}:\n\t{}‘.format
- RuntimeError: NCCL error in: /pytorch/torch/lib/c10d/ProcessGroupNCCL.cpp:784 torch
- (Solved) pytorch error: RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED (install cuda)