0%

The-size-of-tensor-a-(5)-must-match-the-size-of-tensor-b-(3)-at-non-singleton-dimension-3

自动摘要: date:2018122503:38:57 Thesizeoftensora(5)mustmatchthesizeoftensorb(3)atnon ……..

date: 2018-12-25 03:38:57

The size of tensor a (5) must match the size of tensor b (3) at non-singleton dimension 3

原因

网络上层输出与下层输入不匹配;

方法

  1. 打印所有操作的张量形状,然后您将更好地了解Tensor形状如何随每个操作而变化。之后,可以找出要更改的行以使尺寸匹配。
    1. 打断点,了解每层输入输出,不会就用print(xx.size()) 排查

欢迎关注我的其它发布渠道