diff options
Diffstat (limited to 'torch/legacy/nn/SoftMin.py')
-rw-r--r-- | torch/legacy/nn/SoftMin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/torch/legacy/nn/SoftMin.py b/torch/legacy/nn/SoftMin.py index a6e8737fe7..7c1bbbff3f 100644 --- a/torch/legacy/nn/SoftMin.py +++ b/torch/legacy/nn/SoftMin.py @@ -2,6 +2,7 @@ import torch from .Module import Module from .utils import clear + class SoftMin(Module): def __init__(self): @@ -10,7 +11,7 @@ class SoftMin(Module): def updateOutput(self, input): if self.mininput is None: - self.mininput = input.new() + self.mininput = input.new() self.mininput.resize_as_(input).copy_(input).mul_(-1) self._backend.SoftMax_updateOutput( self._backend.library_state, @@ -21,7 +22,7 @@ class SoftMin(Module): def updateGradInput(self, input, gradOutput): if self.mininput is None: - self.mininput = input.new() + self.mininput = input.new() self.mininput.resize_as_(input).copy_(input).mul_(-1) self._backend.SoftMax_updateGradInput( self._backend.library_state, @@ -37,4 +38,3 @@ class SoftMin(Module): def clearState(self): clear(self, 'mininput') return super(SoftMin, self).clearState() - |