Concatenation Error when using LSTM Layers in a Hybrid Actor (RL Toolbox)

조회 수: 5 (최근 30일)
Joschua
Joschua 2025년 1월 30일
편집: Umeshraja 2025년 6월 10일
Hey,
Unfortunately, I run into a concatenation error when I try to use LSTM layers combined with a hybrid actor in my RL framework. There would be an easy way to fix that in the sequenceExperienceArray.m file from the RL toolbox, however, I cannot save the changes because I get the error "Access denied".
Did anyone else experience this and found a workaround?
Thanks!
  댓글 수: 1
Anay
Anay 2025년 2월 3일
Hi Joschua,
It would be helpful if you can share more details about how this concatenation error is occuring. The "Access denied" error you are facing is likely arising because you are directly trying to edit files which are on MATLAB's installation directory and you dont't have the required permissions. I would suggest you to try and resolve the issue without editing such files to avoid unwanted complications in the future.

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

답변 (1개)

Umeshraja
Umeshraja 2025년 6월 10일
편집: Umeshraja 2025년 6월 10일
I understand you are encountering a concatenation error with LSTM layers in a hybrid actor. The problem typically comes from dimension mismatches in network architectures.
To resolve this, ensure that the outputs from the LSTM and any other layers (such as fully connected layers) have compatible dimensions before concatenation. MATLAB functions like permute and reshape can help standardize the tensor formats.
% Example alignment for LSTM output (batch_size × sequence_length × features)
lstm_output_reshaped = permute(lstm_output, [3 1 2 4]);
You may find this MATLAB Answers thread helpful for understanding dimension consistency during concatenation:
Also, when designing reinforcement learning network architectures, it's a good practice to use analyzeNetwork to validate layer connections before training
For further reference, here are the official MATLAB documentation pages:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by