%% Create Softmax Layer
% Create a softmax layer with the name 'sm1'.

layer = softmaxLayer('Name','sm1')

% Include a softmax layer in a Layer array.

layers = [ ...
    imageInputLayer([28 28 1])
    convolution2dLayer(5,20)
    reluLayer
    maxPooling2dLayer(2,'Stride',2)
    fullyConnectedLayer(10)
    softmaxLayer
    classificationLayer]

% Copyright 2012 The MathWorks, Inc.