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

Algorithmic issues #113

Open
AHPUymhd opened this issue Apr 17, 2024 · 3 comments
Open

Algorithmic issues #113

AHPUymhd opened this issue Apr 17, 2024 · 3 comments

Comments

@AHPUymhd
Copy link

{
"base_config": "configs/HighwayEnv/agents/DQNAgent/ddqn.json",
"model": {
"type": "EgoAttentionNetwork",
"embedding_layer": {
"type": "MultiLayerPerceptron",
"layers": [64, 64],
"reshape": false,
"in": 7
},
"others_embedding_layer": {
"type": "MultiLayerPerceptron",
"layers": [64, 64],
"reshape": false,
"in": 7
},
"self_attention_layer": null,
"attention_layer": {
"type": "EgoAttention",
"feature_size": 64,
"heads": 2
},
"output_layer": {
"type": "MultiLayerPerceptron",
"layers": [64, 64],
"reshape": false
}
},
"gamma": 0.99,
"batch_size": 64,
"memory_capacity": 15000,
"target_update": 512
}
Hello, may I ask if this ettention code is run with the algorithm of the attention mechanism? But I see that it is an algorithm that inherits DQN, and I see that there are only DQN, DDQN and DOUBLE DQN in the algorithm library, and whether there are PPO and other algorithms, I am very much looking forward to your reply.

@AHPUymhd
Copy link
Author

@eleurent

@eleurent
Copy link
Owner

Hi,
DQN (and its variants Dueling DQN and Double Dueling DQN) is the learning algorithm (just like PPO is), while Attention/Transformer is the network architecture, which is being trained by the RL algorithm. You fill find the attention implementation in agents/common/models.py.

While I wanted to implement PPO, I never found the time.

But I wrote this script which combines StableBaselines3's PPO with my implementation of attention as a CustomPolicy.

@AHPUymhd
Copy link
Author

Hi, DQN (and its variants Dueling DQN and Double Dueling DQN) is the learning algorithm (just like PPO is), while Attention/Transformer is the network architecture, which is being trained by the RL algorithm. You fill find the attention implementation in agents/common/models.py.

While I wanted to implement PPO, I never found the time.

But I wrote this script which combines StableBaselines3's PPO with my implementation of attention as a CustomPolicy.

Wow, I am really appreciate your help, I'm going to learn your code!

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