Hello all, I have two losses: loss1 and loss2. The loss1 uses a batch size of 16, and the loss2 also uses a batch size of 16. What is the batch size of combined loss1+loss2? This is my code
trainloader1 = dataloader.DataLoader(data1, batch_size=16, shuffle=True)
trainloader2 = dataloader.DataLoader(data2, batch_size=16, shuffle=True)
trainloader1_iter = enumerate(trainloader1)
trainloader2_iter = enumerate(trainloader2)
for iters in range (1000):
	model.train()
	optimizer.zero_grad()        
	_, batch1 = trainloader1_iter.__next__()
	_, batch2 = trainloader2_iter.__next__()
	images1, labels1 = batch1
	images2, labels2 = batch2
	loss1 = criterion1(outputs1, labels1) 
	loss2 = criterion2(outputs2, labels2)
	loss = loss1 + loss2
	loss.backward()
	optimizer.step()