logsigtf_snn.m
来自「神经网络的工具箱, 神经网络的工具箱,」· M 代码 · 共 50 行
M
50 行
function f = logsigtf_snn(x)%LOGSIGTF_SNN Log sigmoid transfer function.%% Syntax%% f = logsigtf_snn(x)%% x - input. % f - output for transfer function.%% Description%% LOGSIGTF_SNN is a transfer function. Transfer functions% calculate a layer's output from its net input.%% LOGSIGTF_SNN(x) takes one input,% x - net input.% and returns % f - 1 / (1 + exp(-x)). %% LOGSIGTF_SNN(CODE) returns useful information for each CODE string:% 'deriv' - Returns name of derivative function.%% See also%% DLOGSIGTF_SNN%% This function is a substitute for LOGSIG from Matlab's NN Toolbox. if nargin < 1, error('Not enough arguments.'); endif isstr(x) switch (x) case 'version' f = 3.0; % <-- Must be 3.0. (can be used in matlabs % Neural network toolbox) case 'deriv' f = 'dlogsigtf_snn'; case 'output' f = [0 1]; case 'active' f = [-4 +4]; otherwise, error('Unrecognized code.') endelse f = 1 ./ (1 + exp(-x)); end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?