Manually modifying weights in Matlab SeriesNetwork without retraining

2 次查看(过去 30 天)
Dear all, I want to manually change weights in a convolutional layer of a trained network, keeping all weights in all other layers constant and explicitly see how classifying accuracy is changing. As far as I am concerned, to classify using modified weights I have to initialize new network with trainNetwork and train it.
net = trainNetwork(merchImagesTrain,layers,options);
I don't want to train at all, I want keep every weight in every layer as it is. Aborting training at the very beginning or shuffling training labels doesn't work well for this problem because there are tiny changes caused by these operations to the weights anyways.
  1 个评论
Kirill Korotaev
Kirill Korotaev 2018-3-9
I am going to answer my own question in case anybody meets the same goal.
The key is to set 'L2Regularization' parameter to 0, set minuscule learning rate and train for 1 epoch

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by