Avoid training certain neurons

3 ビュー (過去 30 日間)
Hamid Moazed
Hamid Moazed 2019 年 12 月 22 日
コメント済み: Hamid Moazed 2019 年 12 月 23 日
Using the Deep Learning Toolbox, I wish to construct a simple feed-forward network for a simulation, however assume I have already trained one of the hidden neurons (out of several) with the correct weights and biases and I don't want them to change during training. How can I make this single specific neuron be "constant" and not get retrained with new wights and biases while the rest of the network is being trained?

採用された回答

Hiro Yoshino
Hiro Yoshino 2019 年 12 月 23 日
There is an option to keep specific layers' learning rates low so you can fix them as they are.
for example
fullyConnectedLayer(<outputsize>, 'WeightLearnRateFactor', 0, 'BiasLearnRateFactor', 0)
This way, you would multiply zero to the global learning rate, which is set via trainingOptions function, and thus the learning rates of the weights in the fully-connected-layer are set as zero.
  1 件のコメント
Hamid Moazed
Hamid Moazed 2019 年 12 月 23 日
Thanks for the quick and thorough response; yes, that makes total sense, why didn't I think of that! Thans again for getting me unstuck.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by