set_wcfnet_e_snn.m
来自「神经网络的工具箱, 神经网络的工具箱,」· M 代码 · 共 38 行
M
38 行
function net = set_wcfnet_e_snn(net, e)%SET_WCFNET_E_SNN Set output variable error functions for a network with cost% function wcf_snn.%% Syntax%% wcfnet = set_wcf_e_snn(wcfnet, e)%% wcfnet - net_struct with cost function wcf_snn.% e - [NL x 1] cell matrix of output variable error function names.% OR% string of output variable error function for all variables.%% (NL = #outputs)% if ~strcmp(get_costfcn_name_snn(get_net_costfcn_snn(net)), 'wcf_snn') error('Network does not have correct cost funtion');endif ~isstr(e) if ~(size(e,2) == 1) error('Size of second dimension of ''e'' must be 1'); end if ~(size(e,1) == size(net.biases{net.numLayers}, 1)) error('Size of first dimension of ''e'' must equal number of outputs in the network'); endendcostfcn_struct = get_net_costfcn_snn(net);costfcn_struct = set_wcf_e_snn(costfcn_struct, e);net = set_net_costfcn_snn(net, costfcn_struct);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?