【发布时间】:2021-09-14 02:48:57
【问题描述】:
我想重写 nn.Linear 所做的事情。问题是输入大小是(N,*,in_feature),权重大小是(out_feature,in_feature)。如果我希望结果是 (N,*,out_feature) 使用 python,我应该如何编写代码?
input @ weight.T
不正确,很遗憾。
【问题讨论】:
-
哦,matmul,我明白了!
标签: python machine-learning deep-learning pytorch