Parameter / Weight sharing

Do you mean something like How to create model with sharing weight??

for i in range(n):
q=q(torch.cat([r,v]))