我有一个张量用 of 调用,另一个张量的大小为 。我想把它们相乘。inputssizetorch.Size([20, 1, 161, 199])masktorch.Size([20, 1, 199])我试过了:masked_inputs = inputs * mask[..., None]但收到一个错误:RuntimeError: The size of tensor a (161) must match the size of tensor b (199) at non-singleton dimension 2我不太确定该怎么办?
添加回答
举报
0/150
提交
取消