fixed model training

This commit is contained in:
Dobromir Popov
2025-11-12 18:11:19 +02:00
parent 7cb4201bc0
commit 8354aec830
6 changed files with 9 additions and 9 deletions

View File

@@ -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