How to deploy Trained Reinforcement Learning Policy with a NN having two input layer?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Anh Tran
2020 年 3 月 21 日
編集済み: Anh Tran
2020 年 3 月 21 日
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.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!