Main Content

预测

使用经过训练的深度学习神经网络预测响应

  • 图书馆:
  • 深度学习工具箱 /深神经网络

  • 预测block

Description

预测block predicts responses for the data at the input by using the trained network specified through the block parameter. This block allows loading of a pretrained network into the Simulink®model from a MAT-file or from a MATLAB®功能。

笔记

使用预测块模型进行预测。万博1manbetx让前dictions programmatically using MATLAB code, use theClassifyandpredictfunctions.

Ports

Input

展开全部

输入端口预测block takes the names of the input layers of the network loaded. For example, if you specifygooglenet为了MATLABfunction,然后预测块被标记data。基于加载的网络,预测块的输入可以是图像,序列或时间序列数据。

输入的格式取决于数据的类型。

Data Format of Predictors
2-D images 一个H-by-w-by-C-by-n数字阵列,哪里H,,,,w,,,,andC分别是图像的高度,宽度和数量,以及nis the number of images.
Vector sequence C-by-smatrices, whereC是序列的功能数量,sis the sequence length.
2-D图像序列 H-by-w-by-C-by-s阵列,哪里H,,,,w,,,,andC分别对应于图像的高度,宽度和数量,并且sis the sequence length.
特征 一个n-by-数字数字阵列,哪里nis the number of observations and数字is the number of features of the input data.

如果阵列包含s,然后它们通过网络传播。

输出

展开全部

这输出sport of the预测Block获取已加载网络的输出层的名称。例如,如果指定googlenet为了MATLABfunction,然后预测块被标记输出。Based on the network loaded, the output of the预测block can represent predicted scores or responses.

预测ed scores or responses, returned as an-by-k数组,哪里n是观察的数量,并且k是类的数量。

如果您启用激活对于网络层,预测block creates a new output port with the name of the selected network layer. This port outputs the activations from the selected network layer.

网络层的激活作为数字阵列返回。输出的格式取决于输入数据的类型和图层输出的类型。

For 2-D image output, activations is anH-by-w-by-C-by-n数组,哪里H,,,,w,,,,andCare the height, width, and number of channels for the output of the chosen layer, respectively, andnis the number of images.

For a single time-step containing vector data, activations is aC-by-nmatrix, wherenis the number of sequences andC是序列中的功能数量。

对于包含二维图像数据的单个时间步长,激活是一个H-by-w-by-C-by-n数组,哪里n是序列的数量,H,,,,w,,,,andC分别是图像的高度,宽度和通道数。

参数

展开全部

Specify the source for the trained network. Select one of the following:

  • 来自Mat-File的网络— Import a trained network from a MAT-file containing a系列网络,,,,dagnetwork, 或者dlnetworkobject.

  • 网络from MATLAB function- 从MATLAB函数导入预计的网络。例如,通过使用googlenet功能。

程序化使用

Block Parameter:网络
类型:角色向量,字符串
值:“来自Mat-File的网络”|“来自MATLAB功能的网络”
默认:“来自Mat-File的网络”

This parameter specifies the name of the MAT-file that contains the trained deep learning network to load. If the file is not on the MATLAB path, use theBrowse按钮以找到文件。

依赖性

To enable this parameter, set the网络参数为来自Mat-File的网络

程序化使用

Block Parameter:网络FilePath
类型:角色向量,字符串
值:垫子档案或名称
默认:'untitled.mat'

此参数指定了预处理的深度学习网络的MATLAB函数的名称。例如,使用googlenet功能以导入验证的Googlenet模型。

依赖性

To enable this parameter, set the网络参数为网络from MATLAB function

程序化使用

Block Parameter:网络函数
类型:角色向量,字符串
值:MATLAB功能名称
默认:'squeezenet'

用于预测的小批量的大小,指定为正整数。较大的迷你批量尺寸需要更多的内存,但可以导致更快的预测。

程序化使用

Block Parameter:MiniBatchSize
类型:角色向量,字符串
值:正整数
默认:'128'

启用返回的输出端口预测分数或响应。

程序化使用

Block Parameter:预测
类型:角色向量,字符串
值:'off'|'上'
默认:'上'

使用激活list to select the layer to extract features from. The selected layers appear as an output port of the预测堵塞。

程序化使用

Block Parameter:激活
类型:角色向量,字符串
值:CHaracter vector in the form of'{'layerName1',layerName2',...}'
默认:''

扩展功能

版本历史记录

在R2020b中引入