我有一個張量用 of 調(diào)用,另一個張量的大小為 。我想把它們相乘。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
提交
取消