singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] joddiy edited a comment on issue #634: cannot do matmul for high-dim tensors
Date Wed, 25 Mar 2020 04:50:16 GMT
joddiy edited a comment on issue #634: cannot do matmul for high-dim tensors
URL: https://github.com/apache/singa/issues/634#issuecomment-603638731
 
 
   Hi, shicong, according to the np's definition, the matmul for high-dim matrix should be:
   
   ```python3
   x1 = np.random.randn(1, 12, 256, 64).astype(np.float32)
   x2 = np.random.randn(1, 12, 64, 256).astype(np.float32)
   print(np.matmul(x1, x2).shape)
   ```
   
   Output:
   > (1, 12, 256, 256)
   
   Actually, it does the matmul for (256, 64) * (64, 256) for all cells of the first two axes
(1, 12).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message