Merge pull request #1105 from kozistr/refactor/remove-condition

Remove checking `smoothing` parameter
pull/1112/head
Ross Wightman 2 years ago committed by GitHub
commit a517bf6a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -310,10 +310,7 @@ class TrainBenchmarkRunner(BenchmarkRunner):
super().__init__(model_name=model_name, device=device, torchscript=torchscript, **kwargs)
self.model.train()
if kwargs.pop('smoothing', 0) > 0:
self.loss = nn.CrossEntropyLoss().to(self.device)
else:
self.loss = nn.CrossEntropyLoss().to(self.device)
self.loss = nn.CrossEntropyLoss().to(self.device)
self.target_shape = tuple()
self.optimizer = create_optimizer_v2(

Loading…
Cancel
Save