Change Last Layer of Actor Network

1 回表示 (過去 30 日間)
Muhammed Murat Özbek
Muhammed Murat Özbek 2022 年 5 月 30 日
回答済み: Poorna 2023 年 9 月 1 日
Hi, i want to change last layer of actor network 3 to 4. i have pretrained network which last layer has 3 output and trained on same environment. But i need to change it to 4(adding new actions). my weights are in .mat format
How can i do it?

回答 (1 件)

Poorna
Poorna 2023 年 9 月 1 日
Hi,
I understand that you would like to replace the output layer consisting of 3 nodes to 4 nodes. You can do this by using the replaceLayer” function.
After loading the pretrained network, you could do the following.
actorNetwork = replaceLayer(actorNetwork, 'Output', fullyConnectedLayer(4, 'Name', 'newOutput'));
Here I assume that actorNetwork is the pretrained Network which is loaded from the weights.mat file.
Hope this Helps!

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by