稳定神经网络

Stabilizing Neural Network

我正在尝试构建一个神经网络并具有以下代码:

for i = 1:num_samples-num_reserved

        % Getting the sample and transposing it so it can be multiplied
        sample = new_data_a(:,i)';

        % Normalizing the input vector
        sample = sample/norm(sample);

        % Calculating output
        outputs = sample*connections;

        % Neuron that fired the hardest's index (I) and its output (output)
        [output, I] = max(outputs);

        % Conections leading to this neuron
        neuron_connections = connections(:,I);

        % Looping through input components
        for j = 1:num_features

            % Value of this input component
            component_input = sample(j);

            % Updating connection weights
            delta = 0.7*(component_input - neuron_connections(j));

            neuron_connections(j) = neuron_connections(j) + delta;


        end


        % Copying new connection weights into original matrix
        connections(:,I) = neuron_connections/norm(neuron_connections);

        if(rem(i,100) == 0)

            if(I == 1)

                delta_track = [delta_track connections(2,I)];

            end

        end

        % Storing current connections



    end

我认为我做的一切都是对的。该循环重复约 600 次,以逐步更新连接。我用的更新权重的函数是我在课本上找到的标准函数

但是,当我查看存储在 delta_track 中的值时,这些值一直在振荡,形成一个规则的模式。

有什么建议吗?

您可以降低反馈系数。那么网络可能需要更多的时间来学习,但不太可能发生振荡。 另一种常见的技术是添加衰减,即减少每次迭代的因子。 一般来说,神经网络具有与控制系统相同的稳定性规则(因为只要 NN 正在学习,它就是一个控制系统)因此类似的方法适用于例如PID 控制器。