Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in alpha_zero.py #1225

Closed
tacertain opened this issue May 10, 2024 · 1 comment
Closed

Failure in alpha_zero.py #1225

tacertain opened this issue May 10, 2024 · 1 comment

Comments

@tacertain
Copy link
Contributor

I finally got TF working and tried to run the alpha zero examples. Running both alpha_zero.py on Quoridor and running the tic_tac_toe_alpha_zero.py yielded the same failure. Is this something known? Is it possibly a library mismatch (I have to say that the version management for Cuda/CudNN/TF/etc is pretty confusing for a newbie, so I'm sure I could have messed something up.)

I will continue to poke around and see if I can figure it out.

  File "/home/certain/src/open_spiel/test/../open_spiel/python/examples/tic_tac_toe_alpha_zero.py", line 68, in <module>
    app.run(main)
  File "/home/certain/src/open_spiel/venv/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/certain/src/open_spiel/venv/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/certain/src/open_spiel/test/../open_spiel/python/examples/tic_tac_toe_alpha_zero.py", line 63, in main
    alpha_zero.alpha_zero(config)
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 545, in alpha_zero
    learner(game=game, config=config, actors=actors,  # pylint: disable=missing-kwoa
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 171, in _watcher
    return fn(config=config, logger=logger, **kwargs)
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 331, in learner
    model = _init_model_from_config(config)
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/alpha_zero.py", line 148, in _init_model_from_config
    return model_lib.Model.build_model(
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 173, in build_model
    cls._define_graph(model_type, input_shape, output_size, nn_width,
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 241, in _define_graph
    torso = cascade(observations, [
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 28, in cascade
    x = fn(x)
  File "/home/certain/src/open_spiel/open_spiel/python/algorithms/alpha_zero/model.py", line 50, in batch_norm_layer
    applied = bn(x, training)
  File "/home/certain/src/open_spiel/venv/lib/python3.10/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/certain/src/open_spiel/venv/lib/python3.10/site-packages/tensorflow/python/framework/tensor_shape.py", line 1440, in as_list
    raise ValueError("as_list() is not defined on an unknown TensorShape.")
ValueError: as_list() is not defined on an unknown TensorShape.
@tacertain
Copy link
Contributor Author

Look like this is a dup of #1206

@tacertain tacertain closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant