coder.loadDeepLearningNetwork
Load deep learning network model
Syntax
Description
loads a pretrained deep learning net
= coder.loadDeepLearningNetwork(filename
)SeriesNetwork
(Deep Learning Toolbox), DAGNetwork
(Deep Learning Toolbox), yolov2ObjectDetector
(Computer Vision Toolbox), ssdObjectDetector
(Computer Vision Toolbox), or dlnetwork
(Deep Learning Toolbox) object saved in the
filename
MAT-file. filename
must be a
valid MAT-file existing on the MATLAB® path containing a single SeriesNetwork
,
DAGNetwork
, yolov2ObjectDetector
,
ssdObjectDetector
, or dlnetwork
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
)SeriesNetwork
, DAGNetwork
,
yolov2ObjectDetector
, ssdObjectDetector
,
or dlnetwork
object. functionname
must be
the name of a function existing on the MATLAB path that returns a SeriesNetwork
,
DAGNetwork
, yolov2ObjectDetector
,
ssdObjectDetector
, or dlnetwork
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
See Also
Functions
Objects
SeriesNetwork
(Deep Learning Toolbox) |DAGNetwork
(Deep Learning Toolbox) |yolov2ObjectDetector
(Computer Vision Toolbox) |ssdObjectDetector
(Computer Vision Toolbox) |dlarray
(Deep Learning Toolbox) |dlnetwork
(Deep Learning Toolbox)