You can. Pytorch typically computes element-wise loss, then average and then backprop.
At the time of defining the loss just choose the proper option not to compute the average and loss will return 100 elements instead of a single number.
Then just backprop each element like element.backward()
You will have to set retain_graph=True .
for element in loss:
element.backward(retain_graph=True)