Normalization process in Reinforcement Learning
이전 댓글 표시
Hi everyone, I have a question about 'Normalization', I'm asking that how do this process operate in ==>featureInputLayer?
The documentation says us that "Normalization" part is performed automatically. Is that true? Because when the featureInputLayer is created, 'Normalization' is defined "None" as following:
----------------------------------------------------------------------------------
featureInputLayer(numObservations,'Normalization','none','Name','observation')
----------------------------------------------------------------------------------
But, How it normalize observations/actions? Can you explain it clearly?
UASS
댓글 수: 3
H. M.
2022년 10월 25일
Hi
did you get any answer yet
Jyo Deshmukh
2022년 11월 23일
In fact when I use normalization with any other option, I get an error:
Error using rl.internal.model.DLNetworkModel>localValidateLayer
Set 'Normalization' parameter
of featureInputLayer to 'none'.
Unmanned Aerial and Space Systems
2022년 11월 28일
답변 (1개)
Ayush Aniket
2025년 9월 2일
0 개 추천
The Normalization parameter in the featureInputLayer allows you to normalize input data directly within the layer. When you are working with Reinforcement Learning Toolbox, especially when defining networks for agents (like DQN, PPO, etc.), the toolbox manages normalization separately. That’s why you see this error:
Set 'Normalization' parameter of featureInputLayer to 'none'.
This is enforced by the internal validation logic of rl.internal.model.DLNetworkModel. The RL framework expects raw input data and applies its own preprocessing pipeline outside the layer definition.
In RL workflows, normalization is typically handled in one of these ways:
- Automatically by the agent: Some agents (like PPO or DDPG) internally normalize observations using running statistics.
- Manually by the user: You can preprocess your observations before feeding them into the environment or agent.
- Using custom layers: If you need specific normalization, you can insert a custom layer after the input layer.
You can not directly use normalization in featureInputLayer in RL agents. If you try to set 'Normalization','zscore' or anything else, the RL framework will reject it. Instead, you can:
- Normalize data manually before passing it to the agent.
- Insert a custom normalization layer in your network architecture.
- Use observation preprocessing functions if supported by your agent/environment.
- Use normalize function introduced in MATLAB R2024a - https://www.mathworks.com/help/reinforcement-learning/ref/rlnormalizer.normalize.html
카테고리
도움말 센터 및 File Exchange에서 Reinforcement Learning에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!