Zhikaiiii:

for neighbor in neighbors:
            neighbors_1.append(self.layer1(neighbor))



Weights are being shared here. The layer defined in __init__() as self.layer1 is a single layer through which you are passing various tensors from the tensor list neighbors.