progress_snn.m
来自「神经网络的工具箱, 神经网络的工具箱,」· M 代码 · 共 62 行
M
62 行
function r = progress_snn(net, data, result)%PROGRESS_SNN Show plot of training progress.%% Syntax%% progress_snn(net, [], tr_info)%% progressfcn_struct = progress_snn('pdefaults')%% Description%% PROGRESS_SNN takes% net - the network in training.% tr_info - a structure containing information about the training% process.% and plots a figure showing the evoluation of the cost function. %% The field 'trainFcn.progressFcn' of 'net' must contain a structure% with the progress function paramters. The default parameters for% this function can be set with:%% net.trainFcn.progressFcn = progress_snn('pdefaults')%% or can be set manually. The parameters are:%% net.trainFcn.progressFcn.name - 'progress_snn'% net.trainFcn.progressFcn.show - a number indicating after how% many training epochs the plot % must be updated.%% See also%% PROGRESSFCN_STRUCT_SNN%if isstr(net) switch (net) case 'pdefaults', progressFcn.name = 'progress_snn'; progressFcn.show = 25; r = progressFcn; otherwise, error('Unrecognized code.') end returnendif (~rem(result.epoch,net.trainFcn.progressFcn.show) | (length(result.stop))) stdout_snn(upper(net.trainFcn.name)); if isfinite(net.trainFcn.epochs) stdout_snn(', Epoch %g/%g', result.epoch, net.trainFcn.epochs); end if isfinite(net.trainFcn.goal) stdout_snn(', %s %g/%g', upper(net.costFcn.name), ... result.tr.perf(result.epoch+1), net.trainFcn.goal); end stdout_snn('\n'); plotperf_snn(result.tr, net.trainFcn.goal, upper(net.trainFcn.name), result.epoch);end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?