crisbodnar/TensorFlow-NEAT

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

Opened this issue · 0 comments

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```