How to deploy Trained Reinforcement Learning Policy with a NN having two input layer?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am having a trained DQN agent, that I want to use in a C++ project. By definition this agent has a deep neural network with two input layers (observation first, action second).
In this Article about deploying RL policies it is stated that "Generating code for deep neural network policies supports networks with only a single input layer".
This is why I cannot us the generatePolicyFunction on my trained DQN agent.
However is there another way to deploy an DQN agent?
_____________________________________________________________________________________
PS: Even your own example with a predefined DQN agent (two input layers) described here is not working. The following commands
load('MATLABCartpoleDQN.mat','agent')
generatePolicyFunction(agent,'FunctionName',"computeAction")
still give me the output: "Code Generation for rlLayerRepresentation objects supports only networks with a single input layer and a single output layer"
Thanks for your answers.
0 commentaires
Réponse acceptée
Anh Tran
le 21 Mar 2020
Modifié(e) : Anh Tran
le 21 Mar 2020
As of R2020a, you can create a DQN agent with Q(s) value function. Q(s) takes observation as input and output Q(s,a) for each possible discrete action. If you have single observation channel, you can generate the policy function and deploy since the Q(s) network now has a single input, observation.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!