You are specifying the batch_size in the DataLoader in these lines of code:
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,
                                          shuffle=True, num_workers=2)

However, as explained before, the error is raised in dim3 not dim0, so I would still recommend to check the shapes of both tensors and make sure the shapes match in the addition.