Using nerual network without the toolbox

23 visualizaciones (últimos 30 días)
Brendan Carter
Brendan Carter el 24 de Dic. de 2020
Editada: Brendan Carter el 13 de En. de 2021
I'd like to distribute a neural network trained using the Deep Learning Toolbox and I'm wondering whether users will need the Deep Learning Toolbox to apply the trained network (i.e., I'm hoping the toolbox is only needed to create and train networks).
If the Toolbox is needed, then could I use the genFunction command to create functions facimilies of the networks that would not need the Toolbox?
Here's a paraphrased version of the code I'm using (though it might might not be important for the question)...
% Create
Structure=% insert whatever
net = feedforwardnet(Structure);
% Train
[NetName,tr] = train(net,TrainingPredictors,TrainingData);
% Use
Output=NetName(Predictors);
Thank you for your time.

Respuestas (1)

Nitin Kapgate
Nitin Kapgate el 13 de En. de 2021
The "genFunction" function generates a MATLAB function for simulating a shallow neural network."genFunction" does not support deep learning networks such as convolutional or LSTM networks.
So if yours is a shallow neural network, you can use "genFunction" to generate a complete stand-alone MATLAB function for simulating a neural network including all settings, weight and bias values, module functions, and calculations in one file.
The result is a standalone MATLAB function file. You can also use this function with MATLAB Compiler and MATLAB Coder tools, hence the requirement of having Deep Learning Toolbox on the user's computer is eliminated.
If you are required to deploy Deep Learning Networks, see Deep Learning Code Generation for more information on code generation for deep learning.
  1 comentario
Brendan Carter
Brendan Carter el 13 de En. de 2021
Editada: Brendan Carter el 13 de En. de 2021
Thank you for the reply!
Yes, through some testing with a colleague I learned that the neural net class did need the Deep Learning toolbox, or some other toolbox that I had and my colleague did not. However, as you said, the genFunction utility allowed me to quickly and easily generate functions to simulate my (shallow) neural networks' behavior to within machine precision. I haven't tested the functions with my colleague, but I suspect they will work.

Iniciar sesión para comentar.

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by