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

AssertionError: assert len(leaf_names) == len(genome_config.input_keys) #10

Open
SilverDash opened this issue Mar 13, 2020 · 0 comments

Comments

@SilverDash
Copy link

So I took the example (adaptive) And tried my hand at setting it up for NES games. (I set it up for mario first)

But I get this error. I have a feeling it's related to those inputs and outputs at the top of the python file.

The input coordinates and the output coordinates. I didn't really understand them so I don't know how to set it up for NES (if that's even the issue at all)

  File "g:/Emulators/ML AI open AI/env2.py", line 130, in <module>
    run()  # pylint: disable=no-value-for-parameter
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "g:/Emulators/ML AI open AI/env2.py", line 120, in run
    winner = pop.run(eval_genomes, n_generations)
  File "g:\emulators\ml ai open ai\src\neat-python\neat\population.py", line 88, in run
    fitness_function(list(self.population.items()), self.config)
  File "g:/Emulators/ML AI open AI/env2.py", line 110, in eval_genomes
    raise e
  File "g:/Emulators/ML AI open AI/env2.py", line 106, in eval_genomes
    genome, config, debug=DEBUG and i % 100 == 0
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\tf_neat\multi_env_eval.py", line 30, in eval_genome
    net = self.make_net(genome, config, self.batch_size)
  File "g:/Emulators/ML AI open AI/env2.py", line 52, in make_net
    device="gpu",
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\tf_neat\adaptive_linear_net.py", line 149, in create
    output_activation=output_activation,
  File "C:\Users\Silver\AppData\Local\Programs\Python\Python37\lib\site-packages\tf_neat\cppn.py", line 199, in create_cppn
    assert len(leaf_names) == len(genome_config.input_keys)
AssertionError```

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