| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Neural Network Toolbox |
| Contents | Index |
softmax is a neural transfer function. Transfer functions calculate a layer's output from its net input.
softmax(N,FP) takes N and optional function parameters,
| N |
S x Q matrix of net input (column) vectors |
| FP |
Struct of function parameters (ignored) |
and returns A, the S x Q matrix of the softmax competitive function applied to each column of N.
softmax('dn',N,A,FP) returns the S x S x Q derivative of A with respect to N. If A or FP are not supplied or are set to [], FP reverts to the default parameters, and A is calculated from N.
softmax('name') returns the name of this function.
softmax('output',FP) returns the [min max] output range.
softmax('active',FP) returns the [min max] active input range.
softmax('fullderiv') returns 1 or 0, depending on whether dA_dN is S x S x Q or S x Q.
softmax('fpnames') returns the names of the function parameters.
softmax('fpdefaults') returns the default function parameters.
Here you define a net input vector N, calculate the output, and plot both with bar graphs.
n = [0; 1; -0.5; 0.5]; a = softmax(n); subplot(2,1,1), bar(n), ylabel('n') subplot(2,1,2), bar(a), ylabel('a')
Assign this transfer function to layer i of a network.
| Provide feedback about this page |
![]() | sim | sp2narx | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |