Implemented batching for TicTacToe AI

This commit is contained in:
Clemens Dautermann 2020-01-28 14:45:00 +01:00
parent 55cff9b18f
commit 56ee2635b5
96 changed files with 8426 additions and 7 deletions

View file

@ -0,0 +1,126 @@
running on cpu
Loading file...
986410
Generating testset...
0%| | 0/10000 [00:00<?, ?it/s] 4%|█▎ | 351/10000 [00:00<00:02, 3501.36it/s] 7%|██▌ | 702/10000 [00:00<00:02, 3503.08it/s] 11%|███▊ | 1055/10000 [00:00<00:02, 3508.80it/s] 14%|█████ | 1414/10000 [00:00<00:02, 3530.39it/s] 18%|██████▍ | 1783/10000 [00:00<00:02, 3574.41it/s] 21%|███████▌ | 2110/10000 [00:00<00:02, 3477.22it/s] 25%|████████▉ | 2477/10000 [00:00<00:02, 3532.52it/s] 28%|██████████▏ | 2843/10000 [00:00<00:02, 3567.42it/s] 32%|███████████▌ | 3208/10000 [00:00<00:01, 3591.39it/s] 36%|████████████▊ | 3576/10000 [00:01<00:01, 3616.43it/s] 39%|██████████████▏ | 3939/10000 [00:01<00:01, 3618.86it/s] 43%|███████████████▍ | 4299/10000 [00:01<00:01, 3611.50it/s] 47%|████████████████▊ | 4669/10000 [00:01<00:01, 3637.32it/s] 50%|██████████████████ | 5034/10000 [00:01<00:01, 3638.78it/s] 54%|███████████████████▍ | 5396/10000 [00:01<00:01, 3626.96it/s] 58%|████████████████████▋ | 5758/10000 [00:01<00:02, 2008.02it/s] 61%|██████████████████████ | 6123/10000 [00:01<00:01, 2320.98it/s] 65%|███████████████████████▎ | 6490/10000 [00:02<00:01, 2608.03it/s] 68%|████████████████████████▌ | 6819/10000 [00:02<00:01, 2780.02it/s] 72%|█████████████████████████▊ | 7181/10000 [00:02<00:00, 2986.41it/s] 75%|███████████████████████████▏ | 7544/10000 [00:02<00:00, 3153.54it/s] 79%|████████████████████████████▍ | 7911/10000 [00:02<00:00, 3290.70it/s] 83%|█████████████████████████████▊ | 8280/10000 [00:02<00:00, 3400.46it/s] 87%|███████████████████████████████▏ | 8651/10000 [00:02<00:00, 3486.08it/s] 90%|████████████████████████████████▍ | 9021/10000 [00:02<00:00, 3545.16it/s] 94%|█████████████████████████████████▊ | 9390/10000 [00:02<00:00, 3587.24it/s] 98%|███████████████████████████████████▏| 9760/10000 [00:02<00:00, 3618.90it/s] 100%|███████████████████████████████████| 10000/10000 [00:03<00:00, 3290.24it/s]
Generating trainset...
0%| | 0/9999 [00:00<?, ?it/s] 4%|█▎ | 350/9999 [00:00<00:02, 3495.50it/s] 7%|██▋ | 715/9999 [00:00<00:02, 3538.49it/s] 11%|████ | 1081/9999 [00:00<00:02, 3573.92it/s] 14%|█████▎ | 1448/9999 [00:00<00:02, 3599.96it/s] 18%|██████▋ | 1819/9999 [00:00<00:02, 3629.98it/s] 22%|████████ | 2186/9999 [00:00<00:02, 3640.84it/s] 26%|█████████▍ | 2555/9999 [00:00<00:02, 3655.21it/s] 29%|██████████▊ | 2923/9999 [00:00<00:01, 3661.51it/s] 33%|████████████▏ | 3292/9999 [00:00<00:01, 3667.77it/s] 37%|█████████████▌ | 3661/9999 [00:01<00:01, 3672.84it/s] 40%|██████████████▊ | 4019/9999 [00:01<00:01, 3612.48it/s] 44%|████████████████▏ | 4384/9999 [00:01<00:01, 3622.65it/s] 48%|█████████████████▌ | 4752/9999 [00:01<00:01, 3638.28it/s] 51%|██████████████████▉ | 5114/9999 [00:01<00:01, 3631.61it/s] 55%|████████████████████▎ | 5475/9999 [00:01<00:01, 3592.49it/s] 58%|█████████████████████▌ | 5836/9999 [00:01<00:01, 3596.28it/s] 62%|██████████████████████▉ | 6195/9999 [00:01<00:01, 3556.03it/s] 66%|████████████████████████▎ | 6561/9999 [00:01<00:00, 3586.47it/s] 69%|█████████████████████████▋ | 6931/9999 [00:01<00:00, 3618.99it/s] 73%|██████████████████████████▉ | 7293/9999 [00:02<00:00, 3606.47it/s] 77%|████████████████████████████▎ | 7662/9999 [00:02<00:00, 3630.22it/s] 80%|█████████████████████████████▋ | 8029/9999 [00:02<00:00, 3640.63it/s] 84%|███████████████████████████████ | 8399/9999 [00:02<00:00, 3656.62it/s] 88%|████████████████████████████████▍ | 8766/9999 [00:02<00:00, 3659.70it/s] 91%|█████████████████████████████████▊ | 9133/9999 [00:02<00:00, 3662.23it/s] 95%|███████████████████████████████████▏ | 9500/9999 [00:02<00:00, 3636.64it/s] 99%|████████████████████████████████████▌| 9865/9999 [00:02<00:00, 3637.81it/s] 100%|█████████████████████████████████████| 9999/9999 [00:02<00:00, 3630.58it/s]
Epoch: 0
0%| | 0/3333 [00:00<?, ?it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([2, 7, 8])
0%| | 1/3333 [00:00<14:08, 3.93it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 9, 3])
tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([3, 9, 9])
0%| | 3/3333 [00:00<11:33, 4.80it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 1, 4])
tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([4, 2, 9])
0%| | 5/3333 [00:00<09:44, 5.69it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([6, 4, 9])
0%| | 6/3333 [00:00<08:30, 6.52it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 9, 1])
0%| | 7/3333 [00:00<07:36, 7.28it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 7, 9])
0%| | 8/3333 [00:00<06:59, 7.93it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([1, 3, 0])
tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([5, 2, 9])
0%| | 10/3333 [00:01<06:33, 8.45it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 3, 9])
0%|▏ | 11/3333 [00:01<06:14, 8.86it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([5, 4, 0])
0%|▏ | 12/3333 [00:01<06:01, 9.17it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([7, 9, 3])
tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 9, 1])
0%|▏ | 14/3333 [00:01<05:52, 9.41it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 9, 3])
tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)
tensor([9, 5, 0])
0%|▏ | 16/3333 [00:01<05:46, 9.58it/s]tensor([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]]],
grad_fn=<LogSoftmaxBackward>)