fixed model training
This commit is contained in:
@@ -323,7 +323,7 @@ class COBRLModelInterface(ModelInterface):
|
||||
self.optimizer.zero_grad()
|
||||
|
||||
if self.scaler:
|
||||
with torch.cuda.amp.autocast():
|
||||
with torch.amp.autocast('cuda'):
|
||||
outputs = self.model(features)
|
||||
loss = self._calculate_loss(outputs, targets)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user