torch/nn — pull request #27 by nicholas-leonard (2014-07-06 18:21:44+00:00)
Title: Module:evaluate/training

This PR adds two methods to the Module interface. `Module:evaluate` sets `self.train = false`, while `Module:training` sets `self.train = true`. This is useful for Modules that require different behaviour during training vs evaluate. A good example would be nn.Dropout, which requires no changes to make use of this interface. I also have some Modules in cunnx that make use of it.