reinitweights_snn.m

来自「神经网络的工具箱, 神经网络的工具箱,」· M 代码 · 共 29 行

M
29
字号
function net = reinitweights_snn(net, std)%REINITWEIGHTS_SNN (re)initialize connection weights and biases.%% Syntax%%  net = reinitweights_snn(net, std)%% Description%%  REINITWEIGHTS_SNN sets the connection weights and biases at random%                    normal variables with mean zero.%%  REINITWEIGHTS_SNN takes%     net   - a net_struct.%     std   - standard deviation for connection weights and biases.%  and returns %     net   - a net_struct with the new connection weights and biases.%if (nargin <  2)   std = 0.01;endfor i = 1:net.numLayers    net.biases{i} = std*randn(size(net.biases{i}));    net.weights{i} = std*randn(size(net.weights{i}));end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?