我有一个张量用 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
我不太确定该怎么办?
温温酱
呼如林
随时随地看视频慕课网APP
相关分类