Can anyone help me what is the difference between these two codes? I mean what happens when we use the same layer for a second time by another variable. Any graphical model would be highly appreciated!
class Net(nn.Module):
def init(self):
super(Net, self).init()
self.conv1 = nn.Conv2d(1, 32, 3, 1)
self.conv2 = nn.Conv2d(32, 64, 3, 1)
def forward(self, x1,x2):
  x1 = self.conv1(x1)
  x2 = self.conv2(x2)
  out=x1+x2
  return output

class Net(nn.Module):
def init(self):
super(Net, self).init()
self.conv1 = nn.Conv2d(1, 32, 3, 1)
def forward(self, x1,x2):
  x1 = self.conv1(x1)
  x2 = self.conv1(x2)
  out=x1+x2
  return output