diff options
Diffstat (limited to 'torch/legacy/nn/Copy.py')
-rw-r--r-- | torch/legacy/nn/Copy.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/torch/legacy/nn/Copy.py b/torch/legacy/nn/Copy.py index 4f9a9c9c72..71c8682cc9 100644 --- a/torch/legacy/nn/Copy.py +++ b/torch/legacy/nn/Copy.py @@ -1,6 +1,7 @@ import torch from .Module import Module + class Copy(Module): def __init__(self, intype, outtype, dontCast=False): @@ -13,15 +14,12 @@ class Copy(Module): self.output.resize_(input.size()).copy_(input) return self.output - def updateGradInput(self, input, gradOutput): self.gradInput.resize_(gradOutput.size()).copy_(gradOutput) return self.gradInput - def type(self, type=None, tensorCache=None): if type and self.dontCast: - return self + return self return super(Copy, self).type(self, type, tensorCache) - |