Skip to content

Commit a517bf6

Browse files
authored
Merge pull request #1105 from kozistr/refactor/remove-condition
Remove checking `smoothing` parameter
2 parents 4476776 + 56a6b38 commit a517bf6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

benchmark.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,7 @@ def __init__(self, model_name, device='cuda', torchscript=False, **kwargs):
310310
super().__init__(model_name=model_name, device=device, torchscript=torchscript, **kwargs)
311311
self.model.train()
312312

313-
if kwargs.pop('smoothing', 0) > 0:
314-
self.loss = nn.CrossEntropyLoss().to(self.device)
315-
else:
316-
self.loss = nn.CrossEntropyLoss().to(self.device)
313+
self.loss = nn.CrossEntropyLoss().to(self.device)
317314
self.target_shape = tuple()
318315

319316
self.optimizer = create_optimizer_v2(

0 commit comments

Comments
 (0)