sigmoidneuron123 commited on
Commit
1bca092
·
verified ·
1 Parent(s): 8cae0e7

Update selfchess.py

Browse files
Files changed (1) hide show
  1. selfchess.py +2 -3
selfchess.py CHANGED
@@ -202,10 +202,9 @@ def main():
202
  print(f"Saving backup model to {CONFIG['backup_model_path']}")
203
  torch.save(model.state_dict(), CONFIG["backup_model_path"])
204
  with mp.Pool(processes=num_instances) as pool:
205
-
206
- results = pool.starmap(game_gen, [(chess.WHITE,) for _ in range(num_games // 3)])
207
  results += pool.starmap(game_gen, [(chess.BLACK,) for _ in range(num_games // 3)])
208
- results += pool.starmap(game_gen, [(None,) for _ in range(num_games // 3)])
209
  for batch in results:
210
  data, c, mc = batch
211
  print(f"Saving backup model to {CONFIG['backup_model_path']}")
 
202
  print(f"Saving backup model to {CONFIG['backup_model_path']}")
203
  torch.save(model.state_dict(), CONFIG["backup_model_path"])
204
  with mp.Pool(processes=num_instances) as pool:
205
+ results = pool.starmap(game_gen, [(None,) for _ in range(num_games // 3)])
206
+ results += pool.starmap(game_gen, [(chess.WHITE,) for _ in range(num_games // 3)])
207
  results += pool.starmap(game_gen, [(chess.BLACK,) for _ in range(num_games // 3)])
 
208
  for batch in results:
209
  data, c, mc = batch
210
  print(f"Saving backup model to {CONFIG['backup_model_path']}")