chess-alpha-zero icon indicating copy to clipboard operation
chess-alpha-zero copied to clipboard

Error in the optimizer now after changes performed by Akababa

Open ilpadrinohack opened this issue 8 years ago • 5 comments

[root@localhost chess-alpha-zero-master]# python3 src/chess_zero/run.py opt 2017-12-26 16:55:29,154@chess_zero.manager INFO # config type: mini Using TensorFlow backend. 2017-12-26 16:55:30,136@chess_zero.worker.optimize DEBUG # loading best model 2017-12-26 16:55:30,137@chess_zero.agent.model_chess DEBUG # loading model from /run/media/root/Fer_descargas/chess-alpha-zero-master/data/model/model_best_config.json 2017-12-26 16:55:30.975444: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2017-12-26 16:55:30.975705: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.8095 pciBusID: 0000:01:00.0 totalMemory: 5.93GiB freeMemory: 5.48GiB 2017-12-26 16:55:30.975718: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1) 2017-12-26 16:55:31,533@chess_zero.agent.model_chess DEBUG # loaded model digest = 0c379712fcb4204eccea535e5ff099cde78f87037e9805c85d4738bc350adb12 Traceback (most recent call last): File "src/chess_zero/run.py", line 16, in manager.start() File "src/chess_zero/manager.py", line 48, in start return optimize.start(config) File "src/chess_zero/worker/optimize.py", line 23, in start return OptimizeWorker(config).start() File "src/chess_zero/worker/optimize.py", line 37, in start self.training() File "src/chess_zero/worker/optimize.py", line 47, in training steps = self.train_epoch(self.config.trainer.epoch_to_checkpoint) File "src/chess_zero/worker/optimize.py", line 65, in train_epoch callbacks=[tensorboard_cb]) File "/usr/local/lib/python3.6/site-packages/keras/engine/training.py", line 1522, in fit batch_size=batch_size) File "/usr/local/lib/python3.6/site-packages/keras/engine/training.py", line 1378, in _standardize_user_data exception_prefix='input') File "/usr/local/lib/python3.6/site-packages/keras/engine/training.py", line 132, in _standardize_input_data str(array.shape)) ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (0, 1)

ilpadrinohack avatar Dec 26 '17 15:12 ilpadrinohack

Do you have files in your play_data folder? Although I agree the optimizer should check for that first.

Akababa avatar Dec 26 '17 16:12 Akababa

I only have two big pgn files.

ilpadrinohack avatar Dec 26 '17 16:12 ilpadrinohack

Ohh okay, as it stands currently you have to run "sl" on them first to convert into json, then "opt". But if it's helpful I have a version in my repo where opt can just read the pgns directly. It uses float16 though so you might have to ctrl+f back to float32 to make it work with the model from this repo.

Akababa avatar Dec 26 '17 16:12 Akababa

Well, using the version in your repo, get this error:

[root@localhost Chess-Zero-float16]# python3 src/chess_zero/run.py sl Using TensorFlow backend. Traceback (most recent call last): File "src/chess_zero/run.py", line 17, in from chess_zero import manager File "src/chess_zero/manager.py", line 5, in from chess_zero.agent.model_chess import ChessModel File "src/chess_zero/agent/model_chess.py", line 15, in from chess_zero.agent.api_chess import ChessModelAPI File "src/chess_zero/agent/api_chess.py", line 6, in from chess_zero.config import Config File "src/chess_zero/config.py", line 107, in class Config: File "src/chess_zero/config.py", line 112, in Config move_lookup = {chess.Move.from_uci(move): i for move, i in zip(self.labels, range(self.n_labels))} NameError: name 'self' is not defined [root@localhost Chess-Zero-float16]#

ilpadrinohack avatar Dec 26 '17 16:12 ilpadrinohack

I just pushed again, but it might be easier to just use sl from this repo until I'm done experimenting with stuff.

Akababa avatar Dec 26 '17 17:12 Akababa