If i do this, does the “Model” and the “Encoder” have same weights?

Or will they become two separate networks?

```
class Encoder(nn.Module):
def __init__(self):
super(Encoder, self).__init__()
self.fc1 = nn.Linear(784, 32)
def forward(self, x):
return F.sigmoid(self.fc1(x))
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
self.fc1 = nn.Linear(32, 784)
def forward(self, x):
return F.sigmoid(self.fc1(x))
class AutoEncoder(nn.Module):
def __init__(self):
super(AutoEncoder, self).__init__()
self.fc1 = Encoder()
self.fc2 = Decoder()
def forward(self, x):
return self.fc2(self.fc1(x))
Model = AutoEncoder()
Encoder = Encoder()
Decoder = Decoder()
```