%% Predict Output Scores Using a Trained LSTM Network
% Load pretrained network. JapaneseVowelsNet is a pretrained LSTM network trained on the Japanese Vowels dataset as described in [1] and [2]. It was trained on the sequences sorted by sequence length with a mini-batch size of 27.

load JapaneseVowelsNet

% View the network architecture.

net.Layers

% Load the test data.

[XTest,YTest] = japaneseVowelsTestData;

% Make predictions on the test data.

YPred = predict(net,XTest);

% View the prediction scores for the first 10 sequences.

YPred(1:10,:)

% Compare these prediction scores to the labels of these sequences. The function assigns high prediction scores to the correct class.

YTest(1:10)

% Copyright 2019 The MathWorks, Inc.