In Lua Torch, nn modules required that you create an output variable: http://torch.ch/docs/developer-docs.html
Are these output variables required by nn modules in PyTorch? Or can I do something like this:
    def forward(self, input):
        self.loss = nn.MSELoss(input, target)
        return input

Instead of something like this:
    def forward(self, input):
        self.loss = nn.MSELoss(input, target)
        self.output = input
        return self.output