Skip to content

Question about recurrent network input format. #7

Description

@barnesew

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions