%% Import ONNX Network with Multiple Outputs
% Import an ONNX network that has multiple outputs as a DAGNetwork object.
% Specify the ONNX model file and import the pretrained ONNX model. By default, importONNXNetwork imports the network as a DAGNetwork object.

modelfile = "digitsMIMO.onnx";
net = importONNXNetwork(modelfile)

% The network has two output layers: one classification layer (ClassificationLayer_sm_1) to classify digits and one regression layer (RegressionLayer_fc_1_Flatten) to compute the mean squared error for the predicted angles of the digits. Plot the network architecture.

plot(net)
title('digitsMIMO Network Architecture')

% To make predictions using the imported network, use the predict function and set the ReturnCategorical option to true.
% Copyright 2021 The MathWorks, Inc.