summaryrefslogtreecommitdiff
path: root/torch/legacy/nn/SoftMarginCriterion.py
diff options
context:
space:
mode:
Diffstat (limited to 'torch/legacy/nn/SoftMarginCriterion.py')
-rw-r--r--torch/legacy/nn/SoftMarginCriterion.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/torch/legacy/nn/SoftMarginCriterion.py b/torch/legacy/nn/SoftMarginCriterion.py
index 1e8a89f731..612e4e0c03 100644
--- a/torch/legacy/nn/SoftMarginCriterion.py
+++ b/torch/legacy/nn/SoftMarginCriterion.py
@@ -1,6 +1,7 @@
import torch
from .Criterion import Criterion
+
class SoftMarginCriterion(Criterion):
def __init__(self, ):
@@ -10,7 +11,7 @@ class SoftMarginCriterion(Criterion):
def updateOutput(self, input, target):
if self.output_tensor is None:
- self.output_tensor = input.new(1)
+ self.output_tensor = input.new(1)
self._backend.SoftMarginCriterion_updateOutput(
self._backend.library_state,
input,
@@ -30,4 +31,3 @@ class SoftMarginCriterion(Criterion):
self.sizeAverage
)
return self.gradInput
-