tf-agents throws ValueError: Layer dense layer expects 1 input(s), but it received 4 input tensors when using custom environment with OpenAI Gym

This page summarizes the projects mentioned and recommended in the original post on /r/learnmachinelearning

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • agents

    TF-Agents: A reliable, scalable and easy to use TensorFlow library for Contextual Bandits and Reinforcement Learning.

  • im currently toying aroud with openai gym and tf-agents for use of a project that i want to start in the near future and am experimenting with setting dictionaries using spaces.Dict as my observational space but i am running into issues getting that working with tf-agents. i've been following this guide which uses the built-in cartpole env packaged with gym to train a DQN agent. the guide looks to be agnostic to any environment when it comes to setting up the agent though, but when i initialize the agent Tensorflow throws an error:

  • gym

    A toolkit for developing and comparing reinforcement learning algorithms.

  • Well it seems it doesn't flatten anything, just passes OrderedDict as input dense. Not sure but apparently it's keras that makes that a list of tensors. You can dig around places like https://github.com/tensorflow/agents/blob/v0.8.0/tf_agents/networks/network.py https://github.com/tensorflow/agents/blob/v0.8.0/tf_agents/agents/dqn/dqn_agent.py https://github.com/openai/gym/blob/master/gym/spaces/dict.py if you want to be really sure.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts