%% Check Output Layer Validity
% Check the layer validity of the custom classification output layer sseClassificationLayer.
% Define a custom sum-of-squares error classification layer. To create this layer, save the file sseClassificationLayer.m in the current folder. Create an instance of the layer.

layer = sseClassificationLayer('sse');

% Check the layer is valid using checkLayer. Specify the valid input size to be the size of a single observation of typical input to the layer. The layer expects a 1-by-1-by-K-by-N array inputs, where K is the number of classes, and N is the number of observations in the mini-batch.

validInputSize = [1 1 10];
checkLayer(layer,validInputSize,'ObservationDimension',4);

% The test summary reports the number of passed, failed, incomplete, and skipped tests.
% Copyright 2018 The MathWorks, Inc.