📄 reinitweights_snn.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -