RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton
这个错误主要是因为,数据的数量不能整除batch size的数量,改正方法有两种
-
将batch size改称可以被 数据量整除即可。
-
将dataloader 中的 drop_last改称False也可。
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton
这个错误主要是因为,数据的数量不能整除batch size的数量,改正方法有两种
将batch size改称可以被 数据量整除即可。
将dataloader 中的 drop_last改称False也可。