coder.loadDeepLearningNetwork
Load deep learning network model
Syntax
Description
loads a pretrained deep learning net
= coder.loadDeepLearningNetwork(filename
)dlnetwork
(Deep Learning Toolbox), SeriesNetwork
(Deep Learning Toolbox), DAGNetwork
(Deep Learning Toolbox), yolov2ObjectDetector
(Computer Vision Toolbox), or ssdObjectDetector
(Computer Vision Toolbox) object saved in the filename
MAT-file. filename
must be a valid MAT-file existing on the
MATLAB® path containing a single dlnetwork
,
SeriesNetwork
, DAGNetwork
,
yolov2ObjectDetector
, or ssdObjectDetector
object. The MAT-file must contain only the network to be loaded.
calls a function that returns a pretrained deep learning net
= coder.loadDeepLearningNetwork(functionname
)dlnetwork
(Deep Learning Toolbox),
SeriesNetwork
, DAGNetwork
,
yolov2ObjectDetector
, orssdObjectDetector
object. functionname
must be the name of a function existing on
the MATLAB path that returns a dlnetwork
,
SeriesNetwork
, DAGNetwork
,
yolov2ObjectDetector
, or ssdObjectDetector
object.
is the same as net
= coder.loadDeepLearningNetwork(___,network_name
)net = coder.loadDeepLearningNetwork(filename)
with
the option to name the C++ class generated from the network.
network_name
is a descriptive name for the network object
saved in the MAT-file or pointed to by the function. The network name must be a
char
type that is a valid identifier in C++.
Use this function when generating code from a network object inference. This function generates a C++ class from this network. The class name is derived from the MAT-file name or the function name.
Note
The input argument of coder.loadDeepLearningNetwork
must be a compile-time constant.
Examples
Input Arguments
Output Arguments
Limitations
coder.loadDeepLearningNetwork
does not support loading MAT-files with multiple networks.The MAT-file must contain only the network to be loaded.
The code generator represents characters in an 8-bit ASCII codeset that the locale setting determines. Therefore, the use of non-ASCII characters in file, folder, or network names might result in errors. For more information, see Encoding of Characters in Code Generation.
Extended Capabilities
Version History
Introduced in R2017b