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

お世話になっております。
現在、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 commentaire

一馬 平田
一馬 平田 le 9 Sep 2021
すいません。自己解決しました。

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!