main content

来自外部平台的预训练网络 -凯发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。要下载支持包,请转至 。

函数

tensorflow 导入

import tensorflow network as matlab network (自 r2023b 起)
(to be removed) import pretrained tensorflow network (自 r2021a 起)
(to be removed) import layers from tensorflow network (自 r2021a 起)
(to be removed) import pretrained keras network and weights
(to be removed) import layers from keras network

pytorch 导入

import pytorch network as matlab network (自 r2022b 起)

caffe 导入

import pretrained convolutional neural network models from caffe
import convolutional neural network layers from caffe

onnx 导入

import onnx network as matlab network (自 r2023b 起)
(to be removed) import pretrained onnx network
(to be removed) import layers from onnx network
import pretrained onnx network as a function (自 r2020b 起)

importonnxfunction 导入的参数

parameters of imported onnx network for deep learning (自 r2020b 起)
convert learnable network parameters in onnxparameters to nonlearnable (自 r2020b 起)
convert nonlearnable network parameters in onnxparameters to learnable (自 r2020b 起)
add parameter to onnxparameters object (自 r2020b 起)
remove parameter from onnxparameters object (自 r2020b 起)
function layer (自 r2021b 起)
find placeholder layers in network architecture imported from keras or onnx
replace layer in layer graph or network
assemble deep learning network from pretrained layers
layer replacing an unsupported keras or onnx layer
add layers to layer graph or network
remove layers from layer graph or network

主题

导入


  • 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 using importtensorflownetwork, and then compare inference results between tensorflow and matlab networks.

  • perform prediction in onnx with a pretrained network, import the network into matlab using importonnxnetwork, 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 using importtensorflownetwork, 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 using importonnxnetwork, importonnxlayers, or importonnxfunction.

  • 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.

相关信息





网站地图