eleurent / rl-agents

Implementations of Reinforcement Learning and Planning algorithms
MIT License
591 stars 153 forks source link

Egoattention does not work in other scenario #71

Closed Yabing67 closed 3 years ago

Yabing67 commented 3 years ago

When I try to run ego attention agents in exit env with following command, it always come up with error.

python experiments.py evaluate configs/ExitEnv/env.json configs/ExitEnv/agents/DQNAgent/ego_attention_5feat.json --train --episodes=4000 --name-from-config

the error looks like: RuntimeError: mat1 dim 1 must match mat2 dim 0

So how can I fix it? Should I change the network?

eleurent commented 3 years ago

Thank you for the feedback! The problem was that the network configuration expects an observation of shape N vehicles x 5 features, but the default environment configuration was changed to generate an observation of N vehicles x 7 features, and I forgot to update the former accordingly.

I have updated the agent network configuration, it should work properly now.