来自外部平台的预训练网络 -凯发k8网页登录
从外部深度学习平台导入预训练网络
从 tensorflow™ 2、tensorflow-keras、pytorch®、onnx™(开放式神经网络交换)模型格式和 caffe 中导入网络和层图。有关详细信息,请参阅预训练的深度神经网络和。
您必须有支持包才能在 deep learning toolbox™ 中运行导入函数。如果未安装支持包,则每个函数都会在附加功能资源管理器中提供对应支持包的下载链接。建议将支持包下载到您正在运行的 matlab® 版本的默认位置。您也可以从以下链接直接下载支持包。
函数需要 deep learning toolbox converter for onnx model format。要下载支持包,请转至 。
函数需要 deep learning toolbox converter for pytorch models。要下载支持包,请转至 。
函数需要 deep learning toolbox converter for tensorflow models。要下载支持包,请转至 。
函数
主题
导入
learn how to import networks from tensorflow, pytorch, and onnx and use the imported networks for common deep learning toolbox workflows. learn how to export networks to tensorflow and onnx.
tips on importing deep learning toolbox networks from tensorflow, pytorch, and onnx.
this example shows how to import a pytorch® model interactively by using the deep network designer app. (自 r2023b 起)- 预训练的深度神经网络
了解如何下载和使用预训练的卷积神经网络进行分类、迁移学习和特征提取。
perform prediction in tensorflow with a pretrained network, import the network into matlab usingimporttensorflownetwork
, and then compare inference results between tensorflow and matlab networks.
perform prediction in onnx with a pretrained network, import the network into matlab usingimportonnxnetwork
, and then compare inference results between onnx and matlab networks.
此示例说明如何从预训练的 keras 网络中导入层、用自定义层替换不支持的层,以及将各层组合成可以进行预测的网络。
this example shows how to import the layers from a pretrained keras network, replace the unsupported layers with function layers, and assemble the layers into a network ready for prediction.
import a pretrained tensorflow network usingimporttensorflownetwork
, and then use the predict block for image classification in simulink®.
import third-party pretrained networks and deploy the networks using matlab compiler™.
import an onnx pretrained network usingimportonnxnetwork
,importonnxlayers
, orimportonnxfunction
.
this example shows how to import a pretrained tensorflow™ network and view the autogenerated layers in deep network designer.
自定义层
了解如何定义自定义深度学习层。
learn how to define custom deep learning intermediate layers.
learn how to define custom deep learning output layers.