fixed model training
This commit is contained in:
@@ -536,7 +536,7 @@ class RealtimeRLCOBTrader:
|
||||
features_tensor = torch.from_numpy(features).unsqueeze(0).to(self.device)
|
||||
|
||||
with torch.no_grad():
|
||||
with torch.cuda.amp.autocast():
|
||||
with torch.amp.autocast('cuda'):
|
||||
outputs = model(features_tensor)
|
||||
|
||||
# Extract predictions
|
||||
@@ -934,7 +934,7 @@ class RealtimeRLCOBTrader:
|
||||
], dtype=torch.float32).to(self.device)
|
||||
|
||||
# Forward pass with mixed precision
|
||||
with torch.cuda.amp.autocast():
|
||||
with torch.amp.autocast('cuda'):
|
||||
outputs = model(features)
|
||||
|
||||
# Calculate losses
|
||||
|
||||
Reference in New Issue
Block a user