码迷,mamicode.com
首页 > 其他好文 > 详细

pytorch的matmul怎么广播

时间:2019-06-10 23:44:26      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:pre   span   4th   怎么   atm   pytorch   class   adc   can   

https://pytorch.org/docs/stable/notes/broadcasting.html#broadcasting-semantics

https://pytorch.org/docs/stable/torch.html?highlight=matmul#torch.matmul

# can line up trailing dimensions >>> x=torch.empty(5,3,4,1) >>> y=torch.empty( 3,1,1) # x and y are broadcastable. # 1st trailing dimension: both have size 1 # 2nd trailing dimension: y has size 1 # 3rd trailing dimension: x size == y size # 4th trailing dimension: y dimension doesn‘t exist


pytorch的matmul怎么广播

标签:pre   span   4th   怎么   atm   pytorch   class   adc   can   

原文地址:https://www.cnblogs.com/Wanggcong/p/11001119.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!