预测
使用经过训练的深度学习神经网络预测响应
- 图书馆:
深度学习工具箱 /深神经网络
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®功能。
Ports
Input
输入
— Image, feature, sequence, or time series data
数字阵列
输入端口预测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,然后它们通过网络传播。
输出
输出
— Predicted scores, responses, or activations
数字阵列
这输出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分别是图像的高度,宽度和通道数。
参数
网络
- 训练网络的来源
来自Mat-File的网络
(默认)|网络from MATLAB function
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
, 或者dlnetwork
object.网络from MATLAB function
- 从MATLAB函数导入预计的网络。例如,通过使用googlenet
功能。
程序化使用
Block Parameter:网络 |
类型:角色向量,字符串 |
值:“来自Mat-File的网络” |“来自MATLAB功能的网络” |
默认:“来自Mat-File的网络” |
File path
- 包含训练有训练的网络的垫子文件
Untitled.mat
(默认)|垫子档案或名称
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' |
MATLABfunction
— MATLAB function name
挤压
(默认)|MATLAB功能名称
此参数指定了预处理的深度学习网络的MATLAB函数的名称。例如,使用googlenet
功能以导入验证的Googlenet模型。
依赖性
To enable this parameter, set the网络参数为网络from MATLAB function
。
程序化使用
Block Parameter:网络函数 |
类型:角色向量,字符串 |
值:MATLAB功能名称 |
默认:'squeezenet' |
Mini-batch size
— Size of mini-batches
128(默认)|正整数
用于预测的小批量的大小,指定为正整数。较大的迷你批量尺寸需要更多的内存,但可以导致更快的预测。
程序化使用
Block Parameter:MiniBatchSize |
类型:角色向量,字符串 |
值:正整数 |
默认:'128' |
预测
- 输出预测的分数或响应
on
(默认)|off
启用返回的输出端口预测分数或响应。
程序化使用
Block Parameter:预测 |
类型:角色向量,字符串 |
值:'off' |'上' |
默认:'上' |
激活
— Output network activations for a specific layer
网络层
使用激活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',...}' |
默认:'' |
模型示例
扩展功能
C/C++ Code Generation
使用Simulink®Coder™生成C和C ++代码。万博1manbetx
Usage notes and limitations:
要生成不依赖第三方库的通用C代码,配置参数>代码生成一般类别,设置语参数为
C
。要生成C ++代码,在配置参数>代码生成一般类别,设置语参数为
C ++
。To specify the target library for code generation, in the代码生成>界面Category, set theTarget Libraryparameter. Setting this parameter tonone
生成不依赖第三方库的通用C ++代码。对于基于ERT的目标,万博1manbetx支持:可变大小信号参数代码生成>界面必须启用窗格。
For a list of networks and layers supported for code generation, see支持代码生成的网络和层万博1manbetx(MATLAB Coder)。
GPU代码生成
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
这语参数配置参数>代码生成一般类别必须设置为
C ++
。For a list of networks and layers supported for CUDA®Code generation, seeSupported Networks, Layers, and Classes(GPU Coder)。
要了解有关生成代码的simulink模型的更多信息万博1manbetx预测块,请参阅代码生成为了a Deep Learning Simulink Model that Performs Lane and Vehicle Detection(GPU Coder)。
版本历史记录
matlabコマンド
Matlabコマンドコマンドにするがクリックされまし。。
matlabコマンドコマンドに入力してしください。。。。ブラウザー
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
You can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
一个mericas
- 一个mérica Latina(Español)
- Canada(English)
- United States(English)