Import patternnet into deep Q network

조회 수: 7 (최근 30일)
Kacjer Frank
Kacjer Frank 2020년 11월 15일
Is it possible to import the trained patternnet in the neural network of deep reinforcement learning. I have already obtained the Pattern Recognition Neural Network using 'patternnet'. And I want to import the neural network as the neural network of DQN. Could you please drop me with some examples or exlain how to realize the above idea. Thank you very much.

채택된 답변

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2020년 11월 16일
Hello,
By 'patternnet' are you referring to this function? If yes, then this does not use the deep learning layer objects that work with Reinforcement Learning Toolbox. You would need to recreate this network with deep learning layers (it's a different API).
In general, if you have a trained network, you can use it as an RL policy assuming it is compatible with the algorithm you want to work with. See this example for instance, where imitation learning is used first to get an initial policy before training further with RL.
  댓글 수: 2
Kacjer Frank
Kacjer Frank 2020년 11월 17일
Thank you for your answer. I wondered if I can extract the weight and biases of the pattern recognition network and use it to build the neural network for deep reinforcement learning (specifically, deep Q network). As the pattern recognition network is a shallow neural with only one hidden layer, and it is similar to the structure of the neural network in DQN. So the API is applicable between each other (DQN and pattern recognition network), where the inputs are the same.
Thank you again for your time and help.
Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2020년 11월 17일
Hello,
It should be possible. 'patternet' creates a network object, and all the weights and biased are accessible (see here). You can take these values, and then specify the layer weights when recreating the neural net as shown here.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by