稳定神经网络

时间:2015-03-09 15:38:24

标签: matlab 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中的值时,这些保持振荡形成一个规则的模式。

有什么建议吗?

1 个答案:

答案 0 :(得分:2)

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

相关问题