Hi,
I am new to pytorch.
When I am defining an encoder and decoder network, why should I create two different classes of the encoder and decoder?
Also I have two auto-encoders.
Is it correct if I define them like this?
class encoder():
     def __init__():
         self.linear_encoder1 = nn.Linear()
         ...
         self.linear_encoder2 = nn.Linear()

    def forward(self,x):
          ..
          return x


How is the above different from:
class encoder1():
     def __init__():
         self.linear_encoder1 = nn.Linear()

    def forward(self,x):
          ..
          return x

class encoder2():
     def __init__():
         self.linear_encoder2 = nn.Linear()
         ...

    def forward(self,x):
          ..
          return x



How does back-prop work for such a case?