# construction, simply
net = Net()
data, label = DataLoader(Dataset)
opt = Optimizer()
criterion1 = Loss1()
criterion2 = Loss2()
output = net(data)
# get loss
loss1 = criterion1(output, label)
loss2 = criterion2(output, label)

# call backward()
# first type
loss1.backward() 
print(next(net.parameters()).grad)
loss2.backward()
print(next(net.parameters()).grad)
# is the above same as below
# second type
loss = loss1+loss2
loss.backward()

# step()
opt.step()

I have two questions.
First, two kinds of backward is equal?
Second, if i want to see the gradient of parameters for different loss, is it the simplest way? Or some more simple way to get the gradient for different losses.