This commit is contained in:
Dobromir Popov
2025-08-26 18:11:34 +03:00
parent f86457fc38
commit c39b70f6fa
4 changed files with 97 additions and 7 deletions

View File

@@ -1071,8 +1071,9 @@ class DQNAgent:
# If no experiences provided, sample from memory
if experiences is None:
# Skip if memory is too small
if len(self.memory) < self.batch_size:
# Skip if memory is too small (allow early training for GPU warmup)
min_required = min(getattr(self, 'batch_size', 32), 16)
if len(self.memory) < min_required:
return 0.0
# Sample random mini-batch from memory