poslin
(To be removed) Positive linear transfer function
poslin will be removed in a future release. For more information,
see Transition Legacy Neural Network Code to dlnetwork Workflows.
For advice on updating your code, see Version History.
Graph and Symbol

Syntax
A = poslin(N,FP)
info = poslin('code')
Description
poslin is a neural transfer function. Transfer
functions calculate a layer’s output from its net input.
A = poslin(N,FP) takes N and
optional function parameters,
N |
|
FP | Struct of function parameters (ignored) |
and returns A, the
S-by-Q matrix of
N’s elements clipped to [0,
inf].
info = poslin('
returns information about this function. The following codes are
supported: code')
poslin('name') returns the name of this
function.
poslin('output',FP) returns the [min
max] output range.
poslin('active',FP) returns the [min
max] active range.
poslin('fullderiv') returns 1 or 0, depending on
whether dA_dN is
S-by-S-by-Q
or S-by-Q.
poslin('fpnames') returns the names of the function
parameters.
poslin('fpdefaults') returns the default function
parameters.
Examples
Here is the code to create a plot of the poslin
transfer function.
n = -5:0.1:5; a = poslin(n); plot(n,a)
Assign this transfer function to layer i of a
network.
net.layers{i}.transferFcn = 'poslin';
Network Use
To change a network so that a layer uses poslin, set
net.layers{i}.transferFcn to
'poslin'.
Call sim to simulate the network with
poslin.
Algorithms
The transfer function poslin returns the output
n if n is greater than
or equal to zero and 0 if n is less than or equal
to zero.
poslin(n) = n, if n >= 0
= 0, if n <= 0
Version History
Introduced before R2006aSee Also
Time Series Modeler | fitrnet (Statistics and Machine Learning Toolbox) | fitcnet (Statistics and Machine Learning Toolbox) | trainnet | trainingOptions | dlnetwork