Hi, I have an issue on creating a super class of autoencoder.
The following class causes an error of “NotImplementedError” in module.py when z = model(x) is evaluated.
I am working on Python 3.6 and got the same error on either Spyder and Prompt.
How can I solve this?
Thank you in advance 
class Autoencoder(nn.Module): # NN module
    def __init__(self):
        super(Autoencoder, self).__init__() # Super class from Autoencoder
        self.encoder = nn.Sequential(
            nn.Linear(28*28, 128),
            nn.ReLU(True),
            nn.Linear(128, 64),
            nn.ReLU(True),
            nn.Linear(64, 12),
            nn.ReLU(True),
            nn.Linear(12, 2)
            )
        
        self.decoder = nn.Sequential(
            nn.Linear(2, 12),
            nn.ReLU(True),
            nn.Linear(12, 64),
            nn.ReLU(True),
            nn.Linear(64, 128),
            nn.ReLU(True),
            nn.Linear(128, 28 * 28),
            nn.Tanh()
            )
        
        def forward(self, x):
            x = self.encoder(x)
            x = self.decoder(x)
            return x