Design an actor critic network for non-image inputs

조회 수: 4 (최근 30일)
ali farid
ali farid 2024년 1월 6일
I have a robot with 3 inputs including wind, and current location and the current action. I use this three inputs to predict the best action for unknown environment using RL Toolbox. My actions are continious so I am using rlContinuousGaussianActor, is there any example that how I can define the actor network when the inputs are not image? For example we have a vector of [3 2] inputs, and an action vector of [1 2], how I can define the actor critic networks.

답변 (1개)

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2024년 1월 9일
I may be missing something but why don't you frame your observations as a [4 1] vector? That way it would be consistent with how most examples are set in Reinforcement Learning Toolbox.
  댓글 수: 2
ali farid
ali farid 2024년 1월 10일
As you mentioned, I used an example from reinforcement learning toolbox where we have 12x12 4 channel observation, so I changed obsSize from [12 12 4] to [4 1], but I see the following error:
Invalid network.
Error in dlnetwork (line 218)
net = initialize(net, dlX{:});
Caused by:
Layer 'conv_1': The size of the convolution dimensions of the padded input data must be larger than or equal to the filter size. For networks with sequence input, this check depends on the MinLength property of the
sequence input layer. To ensure that this check is accurate, set MinLength to the shortest sequence length of your training data.
Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2024년 1월 10일
That's expected because you are apparently using a convolutional layer which is not required here. I would either try following an example that's closer to the nature of your problem, or even better use the default agent capability which automatically generate an initial architecture for the policy that you can then modify as needed. Since you are using rlContinuousGaussianActor, I would try the SAC agent, so take a look at this section.

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by