Hi @albanD,
Thanks for your reply! Its really clear and helpful.
Yes I understand that we need to use nn.Parameter to wrap the weight.
But here I want to know a bit more about what will happen to gradient flow if we intentionally let it be a non-leaf component.
So for the code I shared above, does it mean that the gradient from Loss will directly flow to self.conv1 and F.conv2d there is just like an operator outside the network(since its non-leaf)?
And in general, can I assert like below?
for connection in series:

for connection in parallel(torch.cat()):

Really thanks for your time and help!