深層強化学習(DQN​)における誤差関数を​Huber関数に変更​することは可能でしょ​うか。

4 views (last 30 days)
一馬 平田
一馬 平田 on 2 Sep 2021
Commented: 一馬 平田 on 9 Sep 2021
お世話になっております。
現在、reinforcement learning Toolbox、Deep learning Toolboxを使用して、建築空間の運用制御のためのDQN(DDQN)の構築を行っております。
その際、DQNのQ-networkの誤差関数は二乗誤差を用いているのでしょうか。
もしくは、二乗誤差の問題である勾配爆発を防ぐために、Huber関数を用いているのでしょうか。
誤差関数に二乗誤差を用いている場合、Huber関数に誤差関数を変更するにはどのようにすればよろしいでしょうか。
以下に、現在構築中のDQN(DDQN)のコードを示しております。
宜しくお願い致します。
%DQNエージェントの構築
criticNetwork=[
featureInputLayer(7,'Normalization','none','Name','state')
fullyConnectedLayer(64,'Name','fc1')
reluLayer('Name','relu1')
fullyConnectedLayer(64,'Name','fc2')
reluLayer('Name','relu2')
fullyConnectedLayer(64,'Name','fc3')
reluLayer('Name','relu3')
fullyConnectedLayer(5,'Name','action')];
criticOpts = rlRepresentationOptions('LearnRate',0.001,'Optimizer',"rmsprop");
critic = rlQValueRepresentation(criticNetwork,obsInfo,actInfo,'Observation',{'state'},'Action',{'action'},criticOpts);
agentOptions = rlDQNAgentOptions(...
'SampleTime',Ts,...
'TargetSmoothFactor',1,...
'TargetUpdateFrequency',2,...
'ExperienceBufferLength',50000,...
'ResetExperienceBufferBeforeTraining',false,...
'SaveExperienceBufferWithAgent',true,...
'NumStepsToLookAhead',5,...
'UseDoubleDQN',true,...
'MiniBatchSize',32,...
'DiscountFactor',0.99);
agentOptions.EpsilonGreedyExploration.Epsilon =1;
agentOptions.EpsilonGreedyExploration.EpsilonDecay=0.0097566;
agentOptions.EpsilonGreedyExploration.EpsilonMin=0.02;
agent = rlDQNAgent(critic,agentOptions);
end
  1 Comment
一馬 平田
一馬 平田 on 9 Sep 2021
すいません。自己解決しました。

Sign in to comment.

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!