问题
I am new to the deep learning toolbox in MATLAB and I am very confused about the difference between training function of network and the corresponding learning function of network parameters. For example, if I create a feedforward network with 7 hidden neurons and gradient descent training function:
>> net = feedforwardnet(7,'traingd');
Then, we find what is the learning function of input weight for example:
>> net.inputWeights{1}.learnFcn
ans =
'learngdm'
We find it gradient descent with momentum.
I think that setting the network training parameter to traingd should set all the weights learning functions to be learngd. If I set the network traingda, the learning functions will be learngdm.
The more surprising thing that I can create a network with traingd training function while setting the learning function of weights to be the perceptron learning rule for example:
>> net = feedforwardnet(7,'traingd');
>> net.inputWeights{1}.learnFcn = 'learnp';
And I do not know what is the mathematical meaning of this setting? How the network will be trained in this case?
Based on my understanding, the two functions should be related, so when I set the traingd training function of network, it sets the learngd for all the parameters and does not allow me to change the weight learning rule (read only).
Can anyone explain any point of this discussion?
来源:https://stackoverflow.com/questions/62333003/difference-between-training-function-and-learning-function-in-matlab-neural-netw