Hi, let me make questions more clear:

As for   for-loop , does it supports autograd if it looks like this:

a = Variable(torch.randn(N,C,5,5), requires_grad=True)
conv = torch.nn.Conv2d(C, C, 3, stride=1, padding=1)
conv.weight.data = torch.randn(N, C, 3, 3)
conv.bias.data.fill_(0)
for i in range(5):
    a = conv(a) # if the result overide the original a
 
# if `a=conv(a)` is wrong, how can I do it?