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

Question about recurrent network input format. #7

Open
barnesew opened this issue Nov 25, 2019 · 0 comments
Open

Question about recurrent network input format. #7

barnesew opened this issue Nov 25, 2019 · 0 comments

Comments

@barnesew
Copy link

I'd like to request some clarification as to the input format of net.activate(some_array) from the following code snippet:

from tf_neat.recurrent_net import RecurrentNet

net = RecurrentNet.create(genome, config, bs)
outputs = net.activate(some_array)

My config file specifies 84 input, 0 hidden, and 7 output nodes. I've tried the following input formats with no success:

  • Passing a list of numpy arrays with size (84,)
    • Yields: ValueError: Argument must be a dense tensor: [array([0., 0., ... 0., 0.])] - got shape [1, 84], but wanted [1].
  • Passing a numpy array with size (84,)
    • Yields: ValueError: Shape must be rank 2 but is rank 1 for 'matmul' (op: 'MatMul') with input shapes: [7,84], [84].
  • Passing a numpy array with size (1, 84)
    • Yields: AttributeError: 'Tensor' object has no attribute 'numpy'

All the example code has worked for me and I've set breakpoints in the example to compare my input to that of the examples. Any help is appreciated! I'm very interested in this project.

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