ojaffe commited on
Commit
f5366ce
·
verified ·
1 Parent(s): 9a7321c

Upload folder using huggingface_hub

Browse files
__pycache__/predict.cpython-311.pyc CHANGED
Binary files a/__pycache__/predict.cpython-311.pyc and b/__pycache__/predict.cpython-311.pyc differ
 
model_pole_position.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1088f56767bb7dfe58dcff7a3012337155e45535141ac449ec52076d760328e0
3
- size 2970374
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27d26875071b536cc75cac27a0840b50cd6c9a8e1956c94f1cd08feacc49621f
3
+ size 2971526
model_pong.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2873854bfc6f1de2b637f4008db00ca965f059a7f8b71463584289b45ec2ccba
3
- size 2435560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1a440d1801503eb7e00e8a6ce30b8f43058816440d98506b3e2c8629ca2eeff
3
+ size 2436712
model_sonic.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e5264bc1aac124209754675fcef7947c267ae006820255fbb8772b0c3e489607
3
- size 6180886
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9035098568ea4789c5dda58d685af07b4b5a0cdf300848f79ed6d96ad901da34
3
+ size 6182614
predict.py CHANGED
@@ -1,4 +1,4 @@
1
- """Prediction with gated residual and TTA."""
2
  import sys
3
  import os
4
  import numpy as np
@@ -8,6 +8,7 @@ sys.path.insert(0, "/home/coder/code")
8
  from unet_model import UNet
9
 
10
  CONTEXT_FRAMES = 8
 
11
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
12
 
13
  GAME_CONFIGS = {
@@ -31,11 +32,22 @@ def detect_game(context_frames: np.ndarray) -> str:
31
  return "sonic"
32
 
33
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  def load_model(model_dir: str):
35
  models = {}
36
  for game, cfg in GAME_CONFIGS.items():
37
- # 6 output channels: 3 residual + 3 gate
38
- model = UNet(in_channels=24, out_channels=6,
39
  enc_channels=cfg["enc_channels"],
40
  bottleneck_channels=cfg["bottleneck"],
41
  upsample_mode="bilinear").to(DEVICE)
@@ -45,22 +57,34 @@ def load_model(model_dir: str):
45
  model.load_state_dict(state_dict)
46
  model.eval()
47
  models[game] = model
48
- return models
49
 
50
 
51
- def _predict_gated(model, context_tensor, last_tensor):
52
- """Run gated residual prediction."""
53
- output = model(context_tensor)
54
- residual = output[:, :3]
55
- gate = (output[:, 3:] + 1.0) / 2.0
56
- return torch.clamp(last_tensor + gate * residual, 0, 1)
 
57
 
58
 
59
- def predict_next_frame(models, context_frames: np.ndarray) -> np.ndarray:
 
 
 
 
 
 
 
 
 
 
 
 
60
  game = detect_game(context_frames)
61
- model = models[game]
62
 
63
- n = len(context_frames)
64
  if n < CONTEXT_FRAMES:
65
  padding = np.stack([context_frames[0]] * (CONTEXT_FRAMES - n), axis=0)
66
  frames = np.concatenate([padding, context_frames], axis=0)
@@ -78,7 +102,7 @@ def predict_next_frame(models, context_frames: np.ndarray) -> np.ndarray:
78
  context_tensor = torch.from_numpy(context).to(DEVICE)
79
  last_tensor = torch.from_numpy(last_frame_t).to(DEVICE)
80
 
81
- predicted_orig = _predict_gated(model, context_tensor, last_tensor)
82
 
83
  if game == "pong":
84
  predicted = predicted_orig
@@ -86,11 +110,19 @@ def predict_next_frame(models, context_frames: np.ndarray) -> np.ndarray:
86
  # TTA: horizontal flip
87
  context_flipped = torch.flip(context_tensor, dims=[3])
88
  last_flipped = torch.flip(last_tensor, dims=[3])
89
- predicted_flipped = _predict_gated(model, context_flipped, last_flipped)
90
  predicted_flipped = torch.flip(predicted_flipped, dims=[3])
91
  predicted = (predicted_orig + predicted_flipped) / 2.0
92
 
93
- predicted_np = predicted[0].cpu().numpy()
94
- predicted_np = np.transpose(predicted_np, (1, 2, 0))
95
- predicted_np = (predicted_np * 255).clip(0, 255).astype(np.uint8)
96
- return predicted_np
 
 
 
 
 
 
 
 
 
1
+ """Direct 8-frame prediction with caching and TTA."""
2
  import sys
3
  import os
4
  import numpy as np
 
8
  from unet_model import UNet
9
 
10
  CONTEXT_FRAMES = 8
11
+ PRED_FRAMES = 8
12
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
13
 
14
  GAME_CONFIGS = {
 
32
  return "sonic"
33
 
34
 
35
+ class ModelCache:
36
+ """Wraps models and caches 8-frame predictions."""
37
+ def __init__(self, models):
38
+ self.models = models
39
+ self.cached_predictions = None # List of 8 numpy frames
40
+ self.cache_step = 0
41
+
42
+ def reset_cache(self):
43
+ self.cached_predictions = None
44
+ self.cache_step = 0
45
+
46
+
47
  def load_model(model_dir: str):
48
  models = {}
49
  for game, cfg in GAME_CONFIGS.items():
50
+ model = UNet(in_channels=24, out_channels=24,
 
51
  enc_channels=cfg["enc_channels"],
52
  bottleneck_channels=cfg["bottleneck"],
53
  upsample_mode="bilinear").to(DEVICE)
 
57
  model.load_state_dict(state_dict)
58
  model.eval()
59
  models[game] = model
60
+ return ModelCache(models)
61
 
62
 
63
+ def _predict_8frames(model, context_tensor, last_tensor):
64
+ """Predict all 8 frames at once."""
65
+ output = model(context_tensor) # (1, 24, 64, 64)
66
+ residuals = output.reshape(1, PRED_FRAMES, 3, 64, 64)
67
+ last_expanded = last_tensor.unsqueeze(1).expand_as(residuals)
68
+ predicted = torch.clamp(last_expanded + residuals, 0, 1)
69
+ return predicted # (1, 8, 3, 64, 64)
70
 
71
 
72
+ def predict_next_frame(cache, context_frames: np.ndarray) -> np.ndarray:
73
+ n = len(context_frames)
74
+
75
+ # If we have cached predictions and context grew beyond 8 (AR rollout), return next cached frame
76
+ if cache.cached_predictions is not None and n > CONTEXT_FRAMES and cache.cache_step < PRED_FRAMES:
77
+ result = cache.cached_predictions[cache.cache_step]
78
+ cache.cache_step += 1
79
+ if cache.cache_step >= PRED_FRAMES:
80
+ cache.reset_cache()
81
+ return result
82
+
83
+ # First call for a new window (n == CONTEXT_FRAMES) or fallback: predict all 8 frames
84
+ cache.reset_cache()
85
  game = detect_game(context_frames)
86
+ model = cache.models[game]
87
 
 
88
  if n < CONTEXT_FRAMES:
89
  padding = np.stack([context_frames[0]] * (CONTEXT_FRAMES - n), axis=0)
90
  frames = np.concatenate([padding, context_frames], axis=0)
 
102
  context_tensor = torch.from_numpy(context).to(DEVICE)
103
  last_tensor = torch.from_numpy(last_frame_t).to(DEVICE)
104
 
105
+ predicted_orig = _predict_8frames(model, context_tensor, last_tensor)
106
 
107
  if game == "pong":
108
  predicted = predicted_orig
 
110
  # TTA: horizontal flip
111
  context_flipped = torch.flip(context_tensor, dims=[3])
112
  last_flipped = torch.flip(last_tensor, dims=[3])
113
+ predicted_flipped = _predict_8frames(model, context_flipped, last_flipped)
114
  predicted_flipped = torch.flip(predicted_flipped, dims=[3])
115
  predicted = (predicted_orig + predicted_flipped) / 2.0
116
 
117
+ # Cache all 8 predictions
118
+ predicted_np = predicted[0].cpu().numpy() # (8, 3, 64, 64)
119
+ cache.cached_predictions = []
120
+ for i in range(PRED_FRAMES):
121
+ frame = np.transpose(predicted_np[i], (1, 2, 0))
122
+ frame = (frame * 255).clip(0, 255).astype(np.uint8)
123
+ cache.cached_predictions.append(frame)
124
+
125
+ # Return first frame
126
+ result = cache.cached_predictions[cache.cache_step]
127
+ cache.cache_step += 1
128
+ return result
train.log CHANGED
@@ -1,136 +1,118 @@
1
- [2026-04-11 16:17:43] Starting gated residual training for 2026-04-11-170000-gated-residual
2
- [2026-04-11 16:17:43] Device: cuda
3
- [2026-04-11 16:17:43] === pong ===
4
- [2026-04-11 16:17:44] pong: 1,198,630 params (2.3 MB fp16)
5
- [2026-04-11 16:17:44] pong train: 8432 seqs (len=9)
6
- [2026-04-11 16:17:44] pong val: 992 seqs (len=9)
7
- [2026-04-11 16:17:52] pong E1/100 | T:0.095649(S:0.8123) V:0.077439(S:0.8483) LR:3.00e-04
8
- [2026-04-11 16:17:59] pong E2/100 | T:0.073000(S:0.8570) V:0.069729(S:0.8634) LR:3.00e-04
9
- [2026-04-11 16:18:06] pong E3/100 | T:0.066781(S:0.8692) V:0.066316(S:0.8701) LR:2.99e-04
10
- [2026-04-11 16:18:13] pong E4/100 | T:0.061452(S:0.8797) V:0.066110(S:0.8705) LR:2.99e-04
11
- [2026-04-11 16:18:27] pong E6/100 | T:0.053242(S:0.8958) V:0.061637(S:0.8793) LR:2.97e-04
12
- [2026-04-11 16:18:33] pong E7/100 | T:0.049770(S:0.9027) V:0.053304(S:0.8957) LR:2.96e-04
13
- [2026-04-11 16:18:46] pong E9/100 | T:0.042605(S:0.9168) V:0.052796(S:0.8965) LR:2.94e-04
14
- [2026-04-11 16:18:52] pong E10/100 | T:0.039285(S:0.9233) V:0.047533(S:0.9069) LR:2.93e-04
15
- [2026-04-11 16:19:20] pong E14/100 | T:0.031343(S:0.9389) V:0.043289(S:0.9153) LR:2.86e-04
16
- [2026-04-11 16:19:33] pong E16/100 | T:0.029074(S:0.9434) V:0.042280(S:0.9173) LR:2.82e-04
17
- [2026-04-11 16:19:47] pong E18/100 | T:0.025963(S:0.9495) V:0.041659(S:0.9185) LR:2.77e-04
18
- [2026-04-11 16:19:54] pong E19/100 | T:0.025294(S:0.9508) V:0.038274(S:0.9251) LR:2.74e-04
19
- [2026-04-11 16:20:01] pong E20/100 | T:0.024197(S:0.9529) V:0.037516(S:0.9266) LR:2.71e-04
20
- [2026-04-11 16:20:22] pong E23/100 | T:0.021984(S:0.9573) V:0.036988(S:0.9276) LR:2.63e-04
21
- [2026-04-11 16:20:34] pong E25/100 | T:0.020154(S:0.9608) V:0.036936(S:0.9277) LR:2.56e-04
22
- [2026-04-11 16:20:40] pong E26/100 | T:0.019346(S:0.9624) V:0.036704(S:0.9282) LR:2.53e-04
23
- [2026-04-11 16:20:47] pong E27/100 | T:0.018526(S:0.9640) V:0.034715(S:0.9321) LR:2.49e-04
24
- [2026-04-11 16:21:01] pong E29/100 | T:0.017935(S:0.9652) V:0.033671(S:0.9341) LR:2.42e-04
25
- [2026-04-11 16:21:08] pong E30/100 | T:0.016968(S:0.9671) V:0.033836(S:0.9338) LR:2.38e-04
26
- [2026-04-11 16:21:15] pong E31/100 | T:0.016539(S:0.9679) V:0.032408(S:0.9366) LR:2.35e-04
27
- [2026-04-11 16:21:48] pong E36/100 | T:0.014465(S:0.9720) V:0.031545(S:0.9383) LR:2.14e-04
28
- [2026-04-11 16:22:16] pong E40/100 | T:0.012994(S:0.9749) V:0.030785(S:0.9398) LR:1.97e-04
29
- [2026-04-11 16:22:36] pong E43/100 | T:0.012162(S:0.9765) V:0.030398(S:0.9405) LR:1.83e-04
30
- [2026-04-11 16:22:50] pong E45/100 | T:0.011164(S:0.9784) V:0.030053(S:0.9412) LR:1.74e-04
31
- [2026-04-11 16:23:09] pong E48/100 | T:0.010252(S:0.9802) V:0.029766(S:0.9417) LR:1.60e-04
32
- [2026-04-11 16:23:16] pong E49/100 | T:0.009894(S:0.9809) V:0.029622(S:0.9420) LR:1.55e-04
33
- [2026-04-11 16:23:23] pong E50/100 | T:0.009682(S:0.9813) V:0.029396(S:0.9424) LR:1.50e-04
34
- [2026-04-11 16:23:29] pong E51/100 | T:0.009487(S:0.9817) V:0.028986(S:0.9432) LR:1.46e-04
35
- [2026-04-11 16:23:49] pong E54/100 | T:0.008679(S:0.9833) V:0.028604(S:0.9440) LR:1.32e-04
36
- [2026-04-11 16:23:56] pong E55/100 | T:0.008327(S:0.9840) V:0.028542(S:0.9441) LR:1.27e-04
37
- [2026-04-11 16:24:03] pong E56/100 | T:0.008148(S:0.9843) V:0.028441(S:0.9443) LR:1.22e-04
38
- [2026-04-11 16:24:16] pong E58/100 | T:0.007692(S:0.9852) V:0.028300(S:0.9446) LR:1.13e-04
39
- [2026-04-11 16:24:30] pong E60/100 | T:0.007219(S:0.9861) V:0.028547(S:0.9441) LR:1.04e-04
40
- [2026-04-11 16:24:36] pong E61/100 | T:0.007017(S:0.9865) V:0.027971(S:0.9452) LR:9.99e-05
41
- [2026-04-11 16:24:56] pong E64/100 | T:0.006405(S:0.9877) V:0.027753(S:0.9456) LR:8.68e-05
42
- [2026-04-11 16:25:03] pong E65/100 | T:0.006268(S:0.9880) V:0.027396(S:0.9463) LR:8.26e-05
43
- [2026-04-11 16:25:36] pong E70/100 | T:0.005481(S:0.9895) V:0.027746(S:0.9456) LR:6.26e-05
44
- [2026-04-11 16:26:03] pong E74/100 | T:0.004979(S:0.9905) V:0.027374(S:0.9463) LR:4.82e-05
45
- [2026-04-11 16:26:23] pong E77/100 | T:0.004712(S:0.9910) V:0.027236(S:0.9466) LR:3.84e-05
46
- [2026-04-11 16:26:42] pong E80/100 | T:0.004461(S:0.9915) V:0.027293(S:0.9465) LR:2.96e-05
47
- [2026-04-11 16:26:49] pong E81/100 | T:0.004486(S:0.9914) V:0.027217(S:0.9466) LR:2.69e-05
48
- [2026-04-11 16:27:01] pong E83/100 | T:0.004211(S:0.9920) V:0.027217(S:0.9466) LR:2.18e-05
49
- [2026-04-11 16:27:08] pong E84/100 | T:0.004214(S:0.9920) V:0.027179(S:0.9467) LR:1.95e-05
50
- [2026-04-11 16:27:28] pong E87/100 | T:0.004053(S:0.9923) V:0.027128(S:0.9468) LR:1.33e-05
51
- [2026-04-11 16:27:47] pong E90/100 | T:0.003944(S:0.9925) V:0.027113(S:0.9468) LR:8.32e-06
52
- [2026-04-11 16:27:54] pong E91/100 | T:0.003924(S:0.9925) V:0.027103(S:0.9469) LR:6.94e-06
53
- [2026-04-11 16:28:00] pong E92/100 | T:0.003987(S:0.9924) V:0.027089(S:0.9469) LR:5.70e-06
54
- [2026-04-11 16:28:10] pong E94/100 | T:0.003846(S:0.9927) V:0.027043(S:0.9470) LR:3.65e-06
55
- [2026-04-11 16:28:50] pong E100/100 | T:0.003841(S:0.9927) V:0.027114(S:0.9468) LR:1.00e-06
56
- [2026-04-11 16:28:50] pong done. Best: 0.027043
57
- [2026-04-11 16:28:50] === pole_position ===
58
- [2026-04-11 16:28:50] pole_position: 1,465,254 params (2.8 MB fp16)
59
- [2026-04-11 16:28:51] pole_position train: 4216 seqs (len=9)
60
- [2026-04-11 16:28:51] pole_position val: 496 seqs (len=9)
61
- [2026-04-11 16:28:54] pole_position E1/100 | T:0.039532(S:0.9361) V:0.029246(S:0.9555) LR:3.00e-04
62
- [2026-04-11 16:28:58] pole_position E2/100 | T:0.029045(S:0.9549) V:0.026730(S:0.9596) LR:3.00e-04
63
- [2026-04-11 16:29:01] pole_position E3/100 | T:0.025577(S:0.9612) V:0.023160(S:0.9663) LR:2.99e-04
64
- [2026-04-11 16:29:05] pole_position E4/100 | T:0.023118(S:0.9656) V:0.021109(S:0.9701) LR:2.99e-04
65
- [2026-04-11 16:29:08] pole_position E5/100 | T:0.021705(S:0.9680) V:0.020477(S:0.9712) LR:2.98e-04
66
- [2026-04-11 16:29:12] pole_position E6/100 | T:0.020904(S:0.9695) V:0.019601(S:0.9727) LR:2.97e-04
67
- [2026-04-11 16:29:19] pole_position E8/100 | T:0.019474(S:0.9719) V:0.018615(S:0.9745) LR:2.95e-04
68
- [2026-04-11 16:29:23] pole_position E9/100 | T:0.018991(S:0.9728) V:0.017515(S:0.9759) LR:2.94e-04
69
- [2026-04-11 16:29:26] pole_position E10/100 | T:0.018293(S:0.9740) V:0.016502(S:0.9776) LR:2.93e-04
70
- [2026-04-11 16:29:36] pole_position E13/100 | T:0.017024(S:0.9761) V:0.016444(S:0.9779) LR:2.88e-04
71
- [2026-04-11 16:29:40] pole_position E14/100 | T:0.016553(S:0.9769) V:0.015733(S:0.9789) LR:2.86e-04
72
- [2026-04-11 16:29:51] pole_position E17/100 | T:0.015815(S:0.9781) V:0.015437(S:0.9793) LR:2.79e-04
73
- [2026-04-11 16:30:02] pole_position E20/100 | T:0.015224(S:0.9791) V:0.015312(S:0.9795) LR:2.71e-04
74
- [2026-04-11 16:30:06] pole_position E21/100 | T:0.014894(S:0.9796) V:0.014676(S:0.9806) LR:2.69e-04
75
- [2026-04-11 16:30:20] pole_position E25/100 | T:0.013943(S:0.9812) V:0.014429(S:0.9810) LR:2.56e-04
76
- [2026-04-11 16:30:37] pole_position E30/100 | T:0.013134(S:0.9825) V:0.014006(S:0.9816) LR:2.38e-04
77
- [2026-04-11 16:31:10] pole_position E39/100 | T:0.011958(S:0.9844) V:0.013397(S:0.9825) LR:2.01e-04
78
- [2026-04-11 16:31:13] pole_position E40/100 | T:0.011733(S:0.9847) V:0.014554(S:0.9807) LR:1.97e-04
79
- [2026-04-11 16:31:31] pole_position E45/100 | T:0.011140(S:0.9857) V:0.013389(S:0.9825) LR:1.74e-04
80
- [2026-04-11 16:31:37] pole_position E47/100 | T:0.010996(S:0.9859) V:0.013296(S:0.9827) LR:1.65e-04
81
- [2026-04-11 16:31:44] pole_position E49/100 | T:0.010781(S:0.9863) V:0.013159(S:0.9829) LR:1.55e-04
82
- [2026-04-11 16:31:48] pole_position E50/100 | T:0.010665(S:0.9864) V:0.013498(S:0.9823) LR:1.50e-04
83
- [2026-04-11 16:32:06] pole_position E55/100 | T:0.010428(S:0.9868) V:0.013150(S:0.9828) LR:1.27e-04
84
- [2026-04-11 16:32:17] pole_position E58/100 | T:0.009965(S:0.9876) V:0.012845(S:0.9833) LR:1.13e-04
85
- [2026-04-11 16:32:24] pole_position E60/100 | T:0.009843(S:0.9877) V:0.013185(S:0.9827) LR:1.04e-04
86
- [2026-04-11 16:33:00] pole_position E70/100 | T:0.009284(S:0.9886) V:0.013485(S:0.9824) LR:6.26e-05
87
- [2026-04-11 16:33:35] pole_position E80/100 | T:0.008875(S:0.9893) V:0.012934(S:0.9831) LR:2.96e-05
88
- [2026-04-11 16:34:13] pole_position E90/100 | T:0.008660(S:0.9896) V:0.013031(S:0.9829) LR:8.32e-06
89
- [2026-04-11 16:34:48] pole_position E100/100 | T:0.008578(S:0.9897) V:0.013120(S:0.9828) LR:1.00e-06
90
- [2026-04-11 16:34:48] pole_position done. Best: 0.012845
91
- [2026-04-11 16:34:48] === sonic ===
92
- [2026-04-11 16:34:48] sonic: 3,070,134 params (5.9 MB fp16)
93
- [2026-04-11 16:34:52] sonic train: 31744 seqs (len=9)
94
- [2026-04-11 16:34:52] sonic val: 3968 seqs (len=9)
95
- [2026-04-11 16:35:18] sonic E1/100 | T:0.071182(S:0.8931) V:0.059289(S:0.9136) LR:3.00e-04
96
- [2026-04-11 16:35:42] sonic E2/100 | T:0.062435(S:0.9078) V:0.056818(S:0.9181) LR:3.00e-04
97
- [2026-04-11 16:36:08] sonic E3/100 | T:0.059055(S:0.9134) V:0.053668(S:0.9228) LR:2.99e-04
98
- [2026-04-11 16:36:32] sonic E4/100 | T:0.056658(S:0.9173) V:0.050086(S:0.9283) LR:2.99e-04
99
- [2026-04-11 16:36:57] sonic E5/100 | T:0.054944(S:0.9201) V:0.048682(S:0.9304) LR:2.98e-04
100
- [2026-04-11 16:37:22] sonic E6/100 | T:0.053725(S:0.9220) V:0.047591(S:0.9321) LR:2.97e-04
101
- [2026-04-11 16:37:45] sonic E7/100 | T:0.052663(S:0.9238) V:0.046650(S:0.9342) LR:2.97e-04
102
- [2026-04-11 16:38:34] sonic E9/100 | T:0.050747(S:0.9269) V:0.046527(S:0.9341) LR:2.94e-04
103
- [2026-04-11 16:38:59] sonic E10/100 | T:0.049841(S:0.9284) V:0.045014(S:0.9370) LR:2.93e-04
104
- [2026-04-11 16:39:24] sonic E11/100 | T:0.049065(S:0.9297) V:0.044369(S:0.9375) LR:2.91e-04
105
- [2026-04-11 16:39:48] sonic E12/100 | T:0.047998(S:0.9314) V:0.043863(S:0.9385) LR:2.90e-04
106
- [2026-04-11 16:40:13] sonic E13/100 | T:0.047305(S:0.9326) V:0.043174(S:0.9396) LR:2.88e-04
107
- [2026-04-11 16:40:36] sonic E14/100 | T:0.046801(S:0.9334) V:0.042738(S:0.9406) LR:2.86e-04
108
- [2026-04-11 16:41:01] sonic E15/100 | T:0.045961(S:0.9348) V:0.042151(S:0.9412) LR:2.84e-04
109
- [2026-04-11 16:41:49] sonic E17/100 | T:0.044821(S:0.9367) V:0.041754(S:0.9419) LR:2.80e-04
110
- [2026-04-11 16:42:39] sonic E19/100 | T:0.043730(S:0.9384) V:0.040968(S:0.9431) LR:2.75e-04
111
- [2026-04-11 16:43:04] sonic E20/100 | T:0.043256(S:0.9392) V:0.040902(S:0.9436) LR:2.72e-04
112
- [2026-04-11 16:43:53] sonic E22/100 | T:0.042399(S:0.9406) V:0.040462(S:0.9439) LR:2.67e-04
113
- [2026-04-11 16:45:33] sonic E26/100 | T:0.040782(S:0.9432) V:0.040145(S:0.9450) LR:2.54e-04
114
- [2026-04-11 16:46:22] sonic E28/100 | T:0.040010(S:0.9445) V:0.039091(S:0.9459) LR:2.47e-04
115
- [2026-04-11 16:47:11] sonic E30/100 | T:0.039390(S:0.9455) V:0.039380(S:0.9455) LR:2.40e-04
116
- [2026-04-11 16:48:50] sonic E34/100 | T:0.038061(S:0.9476) V:0.039041(S:0.9462) LR:2.25e-04
117
- [2026-04-11 16:49:14] sonic E35/100 | T:0.037784(S:0.9481) V:0.038663(S:0.9467) LR:2.21e-04
118
- [2026-04-11 16:50:03] sonic E37/100 | T:0.037252(S:0.9490) V:0.038427(S:0.9469) LR:2.13e-04
119
- [2026-04-11 16:51:17] sonic E40/100 | T:0.036337(S:0.9504) V:0.038878(S:0.9464) LR:2.00e-04
120
- [2026-04-11 16:52:30] sonic E43/100 | T:0.035683(S:0.9515) V:0.038385(S:0.9470) LR:1.87e-04
121
- [2026-04-11 16:53:18] sonic E45/100 | T:0.035133(S:0.9524) V:0.038292(S:0.9472) LR:1.78e-04
122
- [2026-04-11 16:54:06] sonic E47/100 | T:0.034642(S:0.9532) V:0.038121(S:0.9475) LR:1.69e-04
123
- [2026-04-11 16:55:19] sonic E50/100 | T:0.033961(S:0.9543) V:0.037790(S:0.9480) LR:1.55e-04
124
- [2026-04-11 16:58:33] sonic E58/100 | T:0.032406(S:0.9568) V:0.037569(S:0.9485) LR:1.19e-04
125
- [2026-04-11 16:59:24] sonic E60/100 | T:0.032100(S:0.9573) V:0.037805(S:0.9480) LR:1.10e-04
126
- [2026-04-11 16:59:48] sonic E61/100 | T:0.031922(S:0.9575) V:0.037534(S:0.9483) LR:1.06e-04
127
- [2026-04-11 17:03:28] sonic E70/100 | T:0.030640(S:0.9596) V:0.037635(S:0.9484) LR:6.98e-05
128
- [2026-04-11 17:07:42] sonic E80/100 | T:0.029672(S:0.9611) V:0.037661(S:0.9482) LR:3.77e-05
129
- [2026-04-11 17:11:48] sonic E90/100 | T:0.029048(S:0.9621) V:0.037644(S:0.9482) LR:1.71e-05
130
- [2026-04-11 17:15:53] sonic E100/100 | T:0.028785(S:0.9625) V:0.037660(S:0.9482) LR:1.00e-05
131
- [2026-04-11 17:15:53] sonic done. Best: 0.037534
132
- [2026-04-11 17:15:53] pong: 2.3 MB
133
- [2026-04-11 17:15:53] pole_position: 2.8 MB
134
- [2026-04-11 17:15:53] sonic: 5.9 MB
135
- [2026-04-11 17:15:53] Total: 11.1 MB
136
- [2026-04-11 17:15:53] Training complete!
 
1
+ [2026-04-11 17:22:57] Starting direct 8-frame training for 2026-04-11-180000-direct-8frame
2
+ [2026-04-11 17:22:57] Device: cuda
3
+ [2026-04-11 17:22:57] === pong ===
4
+ [2026-04-11 17:22:57] pong: 1,199,224 params (2.3 MB fp16)
5
+ [2026-04-11 17:22:58] pong train: 8194 seqs (len=16)
6
+ [2026-04-11 17:22:58] pong val: 964 seqs (len=16)
7
+ [2026-04-11 17:23:19] pong E1/100 | T:0.261624(S:0.6295) V:0.246500(S:0.6510) LR:3.00e-04
8
+ [2026-04-11 17:23:38] pong E2/100 | T:0.222204(S:0.6854) V:0.215782(S:0.6944) LR:3.00e-04
9
+ [2026-04-11 17:23:58] pong E3/100 | T:0.189432(S:0.7318) V:0.196561(S:0.7216) LR:2.99e-04
10
+ [2026-04-11 17:24:16] pong E4/100 | T:0.165138(S:0.7663) V:0.181374(S:0.7430) LR:2.99e-04
11
+ [2026-04-11 17:24:35] pong E5/100 | T:0.146892(S:0.7921) V:0.168277(S:0.7617) LR:2.98e-04
12
+ [2026-04-11 17:24:55] pong E6/100 | T:0.133788(S:0.8107) V:0.160231(S:0.7730) LR:2.97e-04
13
+ [2026-04-11 17:25:16] pong E7/100 | T:0.122975(S:0.8260) V:0.151815(S:0.7850) LR:2.96e-04
14
+ [2026-04-11 17:25:55] pong E9/100 | T:0.108118(S:0.8471) V:0.145642(S:0.7936) LR:2.94e-04
15
+ [2026-04-11 17:26:16] pong E10/100 | T:0.102042(S:0.8557) V:0.145171(S:0.7944) LR:2.93e-04
16
+ [2026-04-11 17:26:35] pong E11/100 | T:0.097010(S:0.8628) V:0.137783(S:0.8048) LR:2.91e-04
17
+ [2026-04-11 17:27:16] pong E13/100 | T:0.088259(S:0.8752) V:0.133496(S:0.8109) LR:2.88e-04
18
+ [2026-04-11 17:27:36] pong E14/100 | T:0.085017(S:0.8798) V:0.128416(S:0.8181) LR:2.86e-04
19
+ [2026-04-11 17:28:54] pong E18/100 | T:0.073576(S:0.8960) V:0.125769(S:0.8218) LR:2.77e-04
20
+ [2026-04-11 17:29:34] pong E20/100 | T:0.069607(S:0.9016) V:0.125478(S:0.8222) LR:2.71e-04
21
+ [2026-04-11 17:30:34] pong E23/100 | T:0.064038(S:0.9095) V:0.123089(S:0.8256) LR:2.63e-04
22
+ [2026-04-11 17:31:15] pong E25/100 | T:0.061200(S:0.9135) V:0.121373(S:0.8280) LR:2.56e-04
23
+ [2026-04-11 17:31:34] pong E26/100 | T:0.060173(S:0.9150) V:0.120411(S:0.8294) LR:2.53e-04
24
+ [2026-04-11 17:31:53] pong E27/100 | T:0.058330(S:0.9176) V:0.119902(S:0.8300) LR:2.49e-04
25
+ [2026-04-11 17:32:33] pong E29/100 | T:0.056276(S:0.9205) V:0.118473(S:0.8321) LR:2.42e-04
26
+ [2026-04-11 17:32:53] pong E30/100 | T:0.054990(S:0.9223) V:0.117756(S:0.8331) LR:2.38e-04
27
+ [2026-04-11 17:33:56] pong E33/100 | T:0.051766(S:0.9269) V:0.116454(S:0.8349) LR:2.27e-04
28
+ [2026-04-11 17:34:37] pong E35/100 | T:0.050350(S:0.9289) V:0.116344(S:0.8351) LR:2.18e-04
29
+ [2026-04-11 17:34:58] pong E36/100 | T:0.048892(S:0.9309) V:0.115702(S:0.8360) LR:2.14e-04
30
+ [2026-04-11 17:35:41] pong E38/100 | T:0.047967(S:0.9322) V:0.115106(S:0.8368) LR:2.06e-04
31
+ [2026-04-11 17:36:23] pong E40/100 | T:0.045971(S:0.9351) V:0.113090(S:0.8397) LR:1.97e-04
32
+ [2026-04-11 17:36:42] pong E41/100 | T:0.045044(S:0.9364) V:0.112823(S:0.8400) LR:1.92e-04
33
+ [2026-04-11 17:37:03] pong E42/100 | T:0.044532(S:0.9371) V:0.112635(S:0.8403) LR:1.88e-04
34
+ [2026-04-11 17:38:03] pong E45/100 | T:0.042640(S:0.9398) V:0.111960(S:0.8413) LR:1.74e-04
35
+ [2026-04-11 17:38:42] pong E47/100 | T:0.041282(S:0.9417) V:0.111201(S:0.8423) LR:1.65e-04
36
+ [2026-04-11 17:39:02] pong E48/100 | T:0.040975(S:0.9421) V:0.111088(S:0.8425) LR:1.60e-04
37
+ [2026-04-11 17:39:42] pong E50/100 | T:0.039824(S:0.9438) V:0.110872(S:0.8428) LR:1.50e-04
38
+ [2026-04-11 17:40:22] pong E52/100 | T:0.038633(S:0.9455) V:0.109695(S:0.8445) LR:1.41e-04
39
+ [2026-04-11 17:41:02] pong E54/100 | T:0.037921(S:0.9465) V:0.109453(S:0.8448) LR:1.32e-04
40
+ [2026-04-11 17:41:56] pong E57/100 | T:0.036545(S:0.9484) V:0.109087(S:0.8453) LR:1.18e-04
41
+ [2026-04-11 17:42:17] pong E58/100 | T:0.035855(S:0.9494) V:0.109036(S:0.8454) LR:1.13e-04
42
+ [2026-04-11 17:42:36] pong E59/100 | T:0.035576(S:0.9498) V:0.108473(S:0.8462) LR:1.09e-04
43
+ [2026-04-11 17:42:56] pong E60/100 | T:0.035289(S:0.9502) V:0.108379(S:0.8463) LR:1.04e-04
44
+ [2026-04-11 17:43:35] pong E62/100 | T:0.034419(S:0.9514) V:0.108306(S:0.8464) LR:9.55e-05
45
+ [2026-04-11 17:43:55] pong E63/100 | T:0.034142(S:0.9518) V:0.107726(S:0.8472) LR:9.11e-05
46
+ [2026-04-11 17:44:33] pong E65/100 | T:0.033535(S:0.9527) V:0.107617(S:0.8474) LR:8.26e-05
47
+ [2026-04-11 17:45:48] pong E69/100 | T:0.032286(S:0.9544) V:0.107517(S:0.8475) LR:6.65e-05
48
+ [2026-04-11 17:46:06] pong E70/100 | T:0.031978(S:0.9549) V:0.107445(S:0.8476) LR:6.26e-05
49
+ [2026-04-11 17:46:27] pong E71/100 | T:0.031772(S:0.9552) V:0.107240(S:0.8479) LR:5.89e-05
50
+ [2026-04-11 17:46:46] pong E72/100 | T:0.031589(S:0.9554) V:0.106995(S:0.8483) LR:5.52e-05
51
+ [2026-04-11 17:47:06] pong E73/100 | T:0.031315(S:0.9558) V:0.106564(S:0.8489) LR:5.16e-05
52
+ [2026-04-11 17:49:21] pong E80/100 | T:0.030090(S:0.9576) V:0.106367(S:0.8492) LR:2.96e-05
53
+ [2026-04-11 17:50:40] pong E84/100 | T:0.029537(S:0.9583) V:0.106164(S:0.8494) LR:1.95e-05
54
+ [2026-04-11 17:51:00] pong E85/100 | T:0.029495(S:0.9584) V:0.106157(S:0.8494) LR:1.73e-05
55
+ [2026-04-11 17:51:40] pong E87/100 | T:0.029253(S:0.9587) V:0.106032(S:0.8496) LR:1.33e-05
56
+ [2026-04-11 17:52:00] pong E88/100 | T:0.029200(S:0.9588) V:0.105951(S:0.8497) LR:1.15e-05
57
+ [2026-04-11 17:52:39] pong E90/100 | T:0.029051(S:0.9590) V:0.106003(S:0.8497) LR:8.32e-06
58
+ [2026-04-11 17:53:00] pong E91/100 | T:0.028990(S:0.9591) V:0.105951(S:0.8497) LR:6.94e-06
59
+ [2026-04-11 17:55:39] pong E99/100 | T:0.028765(S:0.9594) V:0.105859(S:0.8499) LR:1.07e-06
60
+ [2026-04-11 17:55:59] pong E100/100 | T:0.028750(S:0.9595) V:0.106039(S:0.8496) LR:1.00e-06
61
+ [2026-04-11 17:55:59] pong done. Best: 0.105859
62
+ [2026-04-11 17:55:59] === pole_position ===
63
+ [2026-04-11 17:55:59] pole_position: 1,465,848 params (2.8 MB fp16)
64
+ [2026-04-11 17:56:00] pole_position train: 4097 seqs (len=16)
65
+ [2026-04-11 17:56:00] pole_position val: 482 seqs (len=16)
66
+ [2026-04-11 17:56:10] pole_position E1/100 | T:0.075590(S:0.9035) V:0.057663(S:0.9277) LR:3.00e-04
67
+ [2026-04-11 17:56:20] pole_position E2/100 | T:0.064522(S:0.9184) V:0.053095(S:0.9336) LR:3.00e-04
68
+ [2026-04-11 17:56:30] pole_position E3/100 | T:0.060081(S:0.9243) V:0.051676(S:0.9352) LR:2.99e-04
69
+ [2026-04-11 17:56:40] pole_position E4/100 | T:0.057492(S:0.9276) V:0.049574(S:0.9381) LR:2.99e-04
70
+ [2026-04-11 17:56:50] pole_position E5/100 | T:0.055706(S:0.9299) V:0.049319(S:0.9386) LR:2.98e-04
71
+ [2026-04-11 17:57:01] pole_position E6/100 | T:0.053870(S:0.9323) V:0.046328(S:0.9425) LR:2.97e-04
72
+ [2026-04-11 17:57:21] pole_position E8/100 | T:0.050747(S:0.9364) V:0.045251(S:0.9438) LR:2.95e-04
73
+ [2026-04-11 17:57:31] pole_position E9/100 | T:0.049606(S:0.9379) V:0.044027(S:0.9455) LR:2.94e-04
74
+ [2026-04-11 17:57:41] pole_position E10/100 | T:0.048376(S:0.9395) V:0.048385(S:0.9398) LR:2.93e-04
75
+ [2026-04-11 17:58:02] pole_position E12/100 | T:0.046456(S:0.9420) V:0.043792(S:0.9456) LR:2.90e-04
76
+ [2026-04-11 17:58:23] pole_position E14/100 | T:0.044549(S:0.9445) V:0.042208(S:0.9474) LR:2.86e-04
77
+ [2026-04-11 17:58:53] pole_position E17/100 | T:0.042305(S:0.9475) V:0.041426(S:0.9485) LR:2.79e-04
78
+ [2026-04-11 17:59:24] pole_position E20/100 | T:0.040529(S:0.9498) V:0.042968(S:0.9464) LR:2.71e-04
79
+ [2026-04-11 18:01:03] pole_position E30/100 | T:0.036013(S:0.9557) V:0.042198(S:0.9472) LR:2.38e-04
80
+ [2026-04-11 18:02:43] pole_position E40/100 | T:0.033191(S:0.9594) V:0.042161(S:0.9472) LR:1.97e-04
81
+ [2026-04-11 18:04:25] pole_position E50/100 | T:0.030915(S:0.9624) V:0.042456(S:0.9467) LR:1.50e-04
82
+ [2026-04-11 18:06:07] pole_position E60/100 | T:0.029315(S:0.9645) V:0.042134(S:0.9472) LR:1.04e-04
83
+ [2026-04-11 18:07:47] pole_position E70/100 | T:0.028091(S:0.9661) V:0.042533(S:0.9466) LR:6.26e-05
84
+ [2026-04-11 18:09:29] pole_position E80/100 | T:0.027237(S:0.9672) V:0.042501(S:0.9466) LR:2.96e-05
85
+ [2026-04-11 18:11:08] pole_position E90/100 | T:0.026795(S:0.9678) V:0.042639(S:0.9464) LR:8.32e-06
86
+ [2026-04-11 18:12:49] pole_position E100/100 | T:0.026658(S:0.9680) V:0.042839(S:0.9462) LR:1.00e-06
87
+ [2026-04-11 18:12:49] pole_position done. Best: 0.041426
88
+ [2026-04-11 18:12:49] === sonic ===
89
+ [2026-04-11 18:12:49] sonic: 3,071,016 params (5.9 MB fp16)
90
+ [2026-04-11 18:12:54] sonic train: 30848 seqs (len=16)
91
+ [2026-04-11 18:12:54] sonic val: 3856 seqs (len=16)
92
+ [2026-04-11 18:14:11] sonic E1/100 | T:0.175591(S:0.7765) V:0.157856(S:0.8006) LR:3.00e-04
93
+ [2026-04-11 18:15:26] sonic E2/100 | T:0.159479(S:0.7978) V:0.149752(S:0.8110) LR:3.00e-04
94
+ [2026-04-11 18:16:41] sonic E3/100 | T:0.153539(S:0.8056) V:0.147334(S:0.8155) LR:2.99e-04
95
+ [2026-04-11 18:17:56] sonic E4/100 | T:0.149574(S:0.8108) V:0.144793(S:0.8177) LR:2.99e-04
96
+ [2026-04-11 18:19:11] sonic E5/100 | T:0.145852(S:0.8157) V:0.143262(S:0.8198) LR:2.98e-04
97
+ [2026-04-11 18:20:26] sonic E6/100 | T:0.142932(S:0.8196) V:0.142910(S:0.8208) LR:2.97e-04
98
+ [2026-04-11 18:22:55] sonic E8/100 | T:0.137437(S:0.8268) V:0.140100(S:0.8241) LR:2.95e-04
99
+ [2026-04-11 18:25:24] sonic E10/100 | T:0.132863(S:0.8329) V:0.137565(S:0.8273) LR:2.93e-04
100
+ [2026-04-11 18:31:35] sonic E15/100 | T:0.123970(S:0.8445) V:0.137460(S:0.8275) LR:2.84e-04
101
+ [2026-04-11 18:35:22] sonic E18/100 | T:0.119989(S:0.8498) V:0.137060(S:0.8281) LR:2.77e-04
102
+ [2026-04-11 18:36:34] sonic E19/100 | T:0.118824(S:0.8513) V:0.137037(S:0.8283) LR:2.75e-04
103
+ [2026-04-11 18:37:49] sonic E20/100 | T:0.117435(S:0.8531) V:0.137332(S:0.8278) LR:2.72e-04
104
+ [2026-04-11 18:39:04] sonic E21/100 | T:0.116390(S:0.8545) V:0.135734(S:0.8299) LR:2.70e-04
105
+ [2026-04-11 18:50:11] sonic E30/100 | T:0.108528(S:0.8649) V:0.139606(S:0.8249) LR:2.40e-04
106
+ [2026-04-11 19:02:35] sonic E40/100 | T:0.102536(S:0.8727) V:0.138633(S:0.8262) LR:2.00e-04
107
+ [2026-04-11 19:14:57] sonic E50/100 | T:0.098295(S:0.8783) V:0.139113(S:0.8252) LR:1.55e-04
108
+ [2026-04-11 19:27:10] sonic E60/100 | T:0.095048(S:0.8826) V:0.138777(S:0.8255) LR:1.10e-04
109
+ [2026-04-11 19:39:39] sonic E70/100 | T:0.092648(S:0.8857) V:0.141122(S:0.8224) LR:6.98e-05
110
+ [2026-04-11 19:52:02] sonic E80/100 | T:0.091056(S:0.8878) V:0.140701(S:0.8231) LR:3.77e-05
111
+ [2026-04-11 20:04:24] sonic E90/100 | T:0.090060(S:0.8891) V:0.141902(S:0.8214) LR:1.71e-05
112
+ [2026-04-11 20:16:49] sonic E100/100 | T:0.089632(S:0.8897) V:0.141938(S:0.8214) LR:1.00e-05
113
+ [2026-04-11 20:16:49] sonic done. Best: 0.135734
114
+ [2026-04-11 20:16:49] pong: 2.3 MB
115
+ [2026-04-11 20:16:49] pole_position: 2.8 MB
116
+ [2026-04-11 20:16:49] sonic: 5.9 MB
117
+ [2026-04-11 20:16:49] Total: 11.1 MB
118
+ [2026-04-11 20:16:49] Training complete!