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

Train from raw pixels data #4

Open
Jidenna opened this issue Aug 17, 2020 · 1 comment
Open

Train from raw pixels data #4

Jidenna opened this issue Aug 17, 2020 · 1 comment

Comments

@Jidenna
Copy link

Jidenna commented Aug 17, 2020

How do I train without VAE?

Everytime I don't use VAE I get the error below ```

CarlaClient connected
Traceback (most recent call last):
  File "train.py", line 97, in <module>
    env = DummyVecEnv([make_env(client, args.seed, vae=vae)])
  File "/home/joshua/anaconda/lib/python3.6/site-packages/stable_baselines/common/vec_env/dummy_vec_env.py", line 17, in __init__
    self.envs = [fn() for fn in env_fns]
  File "/home/joshua/anaconda/lib/python3.6/site-packages/stable_baselines/common/vec_env/dummy_vec_env.py", line 17, in <listcomp>
    self.envs = [fn() for fn in env_fns]
  File "/home/joshua/Documents/Accelerating Training of DRL/utils/utils.py", line 116, in _init
    n_stack=n_stack)
  File "/home/joshua/Documents/Accelerating Training of DRL/environment/env.py", line 38, in __init__
    shape=(1, self.z_size + self.n_commands * n_command_history),
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Using this  python train.py --algo sac -n 10000 
@sheelabhadra
Copy link
Owner

The code has been set up to only accept 1-D arrays as input (line 38 in env.py). If you want to use raw pixels as input, you will need to change the observation space in env.py and the policy (see utils.py and the hyperparameters directory) to train your agent.

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

2 participants