97 lines
7.3 KiB
Diff
97 lines
7.3 KiB
Diff
diff --git a/TicTacToe_AI/Net/pytorch_ai.py b/TicTacToe_AI/Net/pytorch_ai.py
|
|
index c10ea0e..3bbba77 100644
|
|
--- a/TicTacToe_AI/Net/pytorch_ai.py
|
|
+++ b/TicTacToe_AI/Net/pytorch_ai.py
|
|
@@ -8,7 +8,7 @@ import wandb
|
|
|
|
wandb.init(project="tictactoe")
|
|
|
|
-BATCH_SIZE = 3
|
|
+BATCH_SIZE = 200
|
|
|
|
|
|
def to_set(raw_list):
|
|
@@ -85,7 +85,7 @@ def buildsets():
|
|
testset = to_batched_set(alllines[0:10000])
|
|
|
|
print('Generating trainset...')
|
|
- trainset = to_batched_set(alllines[10001:20000])
|
|
+ trainset = to_batched_set(alllines[10001:])
|
|
|
|
return trainset, testset
|
|
|
|
@@ -134,18 +134,20 @@ loss_function = nn.CrossEntropyLoss()
|
|
|
|
trainset, testset = buildsets()
|
|
|
|
-for epoch in range(100):
|
|
+for epoch in range(300):
|
|
print('Epoch: ' + str(epoch))
|
|
wandb.log({'epoch': epoch})
|
|
for X, label in tqdm(trainset):
|
|
net.zero_grad()
|
|
- X.to(device)
|
|
+ X = X.to(device)
|
|
output = net(X)
|
|
- output.cpu()
|
|
+ output = output.cpu()
|
|
loss = loss_function(output.view(-1, 10), label)
|
|
loss.backward()
|
|
optimizer.step()
|
|
wandb.log({'loss': loss})
|
|
|
|
+ net = net.cpu()
|
|
torch.save(net, './nets/gpunets/net_' + str(epoch) + '.pt')
|
|
+ net = net.to(device)
|
|
testnet(net, testset)
|
|
diff --git a/TicTacToe_AI/Net/wandb/debug.log b/TicTacToe_AI/Net/wandb/debug.log
|
|
index 51ac5d0..0af4662 100644
|
|
--- a/TicTacToe_AI/Net/wandb/debug.log
|
|
+++ b/TicTacToe_AI/Net/wandb/debug.log
|
|
@@ -1,18 +1,18 @@
|
|
-2020-01-28 14:43:14,846 DEBUG MainThread:32731 [wandb_config.py:_load_defaults():111] no defaults not found in config-defaults.yaml
|
|
-2020-01-28 14:43:14,864 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'cat-file', '--batch-check'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=<valid stream>)
|
|
-2020-01-28 14:43:14,877 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
-2020-01-28 14:43:14,887 DEBUG MainThread:32731 [cmd.py:execute():728] Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/home/clemens/repositorys/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
-2020-01-28 14:43:14,906 DEBUG MainThread:32731 [run_manager.py:__init__():535] Initialized sync for tictactoe/mvx4evw0
|
|
-2020-01-28 14:43:14,912 INFO MainThread:32731 [run_manager.py:wrap_existing_process():1133] wrapping existing process 32725
|
|
-2020-01-28 14:43:14,913 WARNING MainThread:32731 [io_wrap.py:register():104] SIGWINCH handler was not None: <Handlers.SIG_DFL: 0>
|
|
-2020-01-28 14:43:14,919 DEBUG MainThread:32731 [connectionpool.py:_new_conn():815] Starting new HTTPS connection (1): pypi.org:443
|
|
-2020-01-28 14:43:15,060 DEBUG MainThread:32731 [connectionpool.py:_make_request():393] https://pypi.org:443 "GET /pypi/wandb/json HTTP/1.1" 200 39767
|
|
-2020-01-28 14:43:15,179 INFO MainThread:32731 [run_manager.py:init_run():918] system metrics and metadata threads started
|
|
-2020-01-28 14:43:15,181 INFO MainThread:32731 [run_manager.py:wrap_existing_process():1150] informing user process we are ready to proceed
|
|
-2020-01-28 14:43:15,183 INFO MainThread:32731 [run_manager.py:_sync_etc():1257] entering loop for messages from user process
|
|
-2020-01-28 14:43:15,862 INFO Thread-3 :32731 [run_manager.py:_on_file_modified():682] file/dir modified: /home/clemens/repositorys/pytorch-ai/TicTacToe_AI/Net/wandb/dryrun-20200128_134313-mvx4evw0/config.yaml
|
|
-2020-01-28 14:43:32,850 INFO MainThread:32731 [run_manager.py:_sync_etc():1313] process received interrupt signal, shutting down
|
|
-2020-01-28 14:43:32,850 INFO MainThread:32731 [run_manager.py:_sync_etc():1366] closing log streams and sending exitcode to W&B
|
|
-2020-01-28 14:43:32,851 INFO MainThread:32731 [run_manager.py:shutdown():1057] shutting down system stats and metadata service
|
|
- MainThread:32731 [mvx4evw0:run_manager.py:_sync_etc():1366] closing log streams and sending exitcode to W&B
|
|
-2020-01-28 14:43:32,851 INFO MainThread:32731 [mvx4evw0:run_manager.py:shutdown():1057] shutting down system stats and metadata service
|
|
+2020-01-28 15:11:43,421 DEBUG MainThread:25378 [wandb_config.py:_load_defaults():111] no defaults not found in config-defaults.yaml
|
|
+2020-01-28 15:11:43,433 DEBUG MainThread:25378 [cmd.py:execute():728] Popen(['git', 'cat-file', '--batch-check'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=<valid stream>)
|
|
+2020-01-28 15:11:43,439 DEBUG MainThread:25378 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
+2020-01-28 15:11:43,445 DEBUG MainThread:25378 [cmd.py:execute():728] Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
+2020-01-28 15:11:43,463 DEBUG MainThread:25378 [run_manager.py:__init__():535] Initialized sync for tictactoe/3mybeyuz
|
|
+2020-01-28 15:11:43,467 INFO MainThread:25378 [run_manager.py:wrap_existing_process():1133] wrapping existing process 25368
|
|
+2020-01-28 15:11:43,468 WARNING MainThread:25378 [io_wrap.py:register():104] SIGWINCH handler was not None: <Handlers.SIG_DFL: 0>
|
|
+2020-01-28 15:11:43,473 DEBUG MainThread:25378 [connectionpool.py:_new_conn():824] Starting new HTTPS connection (1): pypi.org
|
|
+2020-01-28 15:11:43,571 DEBUG MainThread:25378 [connectionpool.py:_make_request():396] https://pypi.org:443 "GET /pypi/wandb/json HTTP/1.1" 200 39767
|
|
+2020-01-28 15:11:43,600 INFO MainThread:25378 [run_manager.py:init_run():918] system metrics and metadata threads started
|
|
+2020-01-28 15:11:43,600 INFO MainThread:25378 [run_manager.py:init_run():952] upserting run before process can begin, waiting at most 10 seconds
|
|
+2020-01-28 15:11:43,615 DEBUG Thread-14 :25378 [connectionpool.py:_new_conn():824] Starting new HTTPS connection (1): api.wandb.ai
|
|
+2020-01-28 15:11:43,896 DEBUG Thread-14 :25378 [connectionpool.py:_make_request():396] https://api.wandb.ai:443 "POST /graphql HTTP/1.1" 200 543
|
|
+2020-01-28 15:11:43,909 INFO Thread-14 :25378 [run_manager.py:_upsert_run():1037] saving patches
|
|
+2020-01-28 15:11:43,910 DEBUG Thread-14 :25378 [cmd.py:execute():728] Popen(['git', 'rev-parse', '--show-toplevel'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
+2020-01-28 15:11:43,916 DEBUG Thread-14 :25378 [cmd.py:execute():728] Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
+2020-01-28 15:11:43,923 DEBUG Thread-14 :25378 [cmd.py:execute():728] Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
+2020-01-28 15:11:43,931 DEBUG Thread-14 :25378 [cmd.py:execute():728] Popen(['git', 'version'], cwd=/home/clemens/Dokumente/repos/pytorch-ai, universal_newlines=False, shell=None, istream=None)
|
|
diff --git a/TicTacToe_AI/Net/wandb/settings b/TicTacToe_AI/Net/wandb/settings
|
|
index 26efadd..a700e2e 100644
|
|
--- a/TicTacToe_AI/Net/wandb/settings
|
|
+++ b/TicTacToe_AI/Net/wandb/settings
|
|
@@ -1,5 +1,4 @@
|
|
[default]
|
|
project = tictactoe
|
|
entity = cdautermann
|
|
-disabled = true
|
|
|