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 that have multiple networks or multiple object detectors.The locale setting determines the 8-bit ASCII codeset that the code generator uses to represent characters. Therefore, the use of non-ASCII characters in file, folder, or network names can result in errors. For more information, see Encoding of Characters in Code Generation.
Extended Capabilities
Version History
Introduced in R2017b