set_wcfnet_a_snn.m

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

M
34
字号
function net = set_wcfnet_a_snn(net, a)%SET_WCFNET_A_SNN Set output variable weights for a network with cost%                 function wcf_snn.%% Syntax%%   wcfnet = set_wcfnet_a_snn(wcfnet, a)%%         wcfnet - net_struct with cost function wcf_snn.%         a      - [NL x 1] matrix of output variable weights.%%  (NL = #outputs)%if ~strcmp(get_costfcn_name_snn(get_net_costfcn_snn(net)), 'wcf_snn')   error('Network does not have correct cost funtion');endif ~(isempty(a))   if ~(size(a,2) == 1)      error('Size of second dimension of ''a'' must be 1');   end   if ~(size(a,1) == size(net.biases{net.numLayers}, 1))      error('Size of first dimension of ''a'' must equal number of outputs in the network');   endendcostfcn_struct = get_net_costfcn_snn(net);costfcn_struct = set_wcf_a_snn(costfcn_struct, a);net = set_net_costfcn_snn(net, costfcn_struct);

⌨️ 快捷键说明

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