setx_snn.m

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

M
17
字号
function net = setx_snn(net, X)%SETX_SNN Set connection weights and biases of net from X.%% See also%%  GETX_SNN%ind_1 = 1;for m = 1:net.numLayers   [rows, columns] = size(net.weights{m});   ind_2 = ind_1 + rows*columns;   net.weights{m} = reshape(X([ind_1:(ind_2-1)],1), rows, columns);   ind_1 = ind_2 + rows;   net.biases{m} = reshape(X([ind_2:(ind_1-1)],1), rows, 1);end

⌨️ 快捷键说明

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