今天我在理解一个例子的时候,我使用了一下torch.zeros却莫名秒的报错 1.原始code batch_size=64, dim=4 def a(batch_size,dim): out = torch.zeros(batch_size, dim) print(out) out