Thank you for the reply! May post some code here, so that I can explain it more clearly.
while True:
x = torch.randn(batch,1, h, w).cuda()
y = net(x)
sum += y
So basically, I am just summing all the outputs, and the computation graph should be attched to the outputs, right? However, the GPU usage remains the same. I don’t understand why.
Thanks!