MATLAB: How to deploy the Training of a Neural Network in a standalone executable Matlab GUI App

deep learning

Hi there,
I am trying to use MATLAB's app designer to create a GUI for training a Neural Network. The app basically assesses the Network's pewrformance (confusion Matrix), trains it, assesses it again on the training, test, and val datasets (confusion matrices). This process works when running in the App Designer, but not when the app is compiled into a standalone matlab executable. Instead of following the program, it stalls on step 2 below, never to train the Neural Network that is loaded, even though it compiles and runs. The prj configuration is as follows:
The program successfully runs until it reaches this line of code:
[L,net] = bayesianLossFull(train,val, solvedSettings.lambda_obj,solvedSettings.lambda_noobj,solvedSettings.lambda_class, …
solvedSettings.alpha,solvedSettings.df,solvedSettings.dr,solvedSettings.epochs,solvedSettings.minibatch, …
solvedSettings.rot, solvedSettings.scale, solvedSettings.t, solvedSettings.xShear, solvedSettings.yShear, solvedSettings.reflection);
which is a function that invokes the train() method (the culprit). Firstly, I am aware that this link (and several others) states that deep neural networks are unable to be trained in Matlab's executable form:
However, this (and the other threads I have found are old and perhaps outdated.
I also know that matlab allows training of shallow neural networks here:
But the network I'm using is a larger, more complex one.
The app asks for a path to a dataset and executes training as such (when working properly):
  1. Pressing Execute creates a confusion matrix assessing the performance of a given network
2. The Network is trained on the given dataset (stalls here)
3. The new network is assessed by the given confusion matrices for each dataset
4. The program outputs an onnx file as a newly updated network.
Any help would be appreciated, Thanks!

Best Answer

Answering my own question,
Matlab's MCC Compiler actually supports training of Neural Networks now, but not the displaying of the training UI as shown here:
So, the solution was to invoke training without creating this UI as such:
options = trainingOptions('sgdm', 'MaxEpochs',8, 'ValidationData',{XValidation,YValidation}, 'ValidationFrequency',30, 'Verbose',false,'Plots','training-progress');
This needed to be changed to:
options = trainingOptions('sgdm', 'MaxEpochs',1, 'ValidationData',{XValidation,YValidation},'ValidationFrequency',30, 'Verbose',true, 'Plots','none');
Another issue upon execution was with ONNX Runtime Exporting (stalled when trying to create). To solve this, I needed to include the library directory of onnx runtime in the mcc compilation as described here:
and as shown here:
I hope this can help someone!