主要内容

有状态分类

Classify data using a trained deep learning recurrent neural network

  • Library:
  • 深度学习工具箱/深神经膜ral Networks

  • 有状态分类block

Description

The有状态分类通过使用通过块参数指定的培训的复发性神经网络,块通过块参数指定的培训的复发性神经网络预测输入数据的类标签。此块允许将备用网络加载到Simulink中金宝app®来自垫子文件或来自Matlab的模型®功能。此块通过每次预测更新网络状态。

限制

The有状态分类块不支持Mat文件日志记录。金宝app

Ports

输入

expand all

The format of the input depend on the type of data.

输入 Description
Vector sequences c-经过-s矩阵,在那里cis the number of features of the sequences ands是序列长度。
2-D image sequences h-经过-w-经过-c-经过-sarrays, whereh,w, 和ccorrespond to the height, width, and number of channels of the images, respectively, ands是序列长度。

Output

expand all

预测的类标签具有最高分,作为一个返回N-经过-1 enumerated vector of labels, whereN是观察人数。

预测得分,作为一个返回N-经过-K矩阵,其中Nis the number of observations, andKis the number of classes.

与预测分数相关的标签,作为a返回N-经过-K矩阵,其中Nis the number of observations, andKis the number of classes.

Parameters

expand all

指定source for the trained recurrent neural network. The trained network must have at least one recurrent layer (for example, an LSTM network). Select one of the following:

  • Network from MAT-file— Import a trained recurrent neural network from a MAT-file containing aSeriesNetwork,DAGNetwork, ordlnetwork目的。

  • 来自MATLAB功能的网络— Import a pretrained recurrent neural network from a MATLAB function.

Programmatic Use

Block Parameter:Network
Type:character vector, string
Values:'Network from MAT-file'|'Network from MATLAB function'
Default:'Network from MAT-file'

此参数指定包含培训的常规神经网络的MAT文件的名称。如果文件不在MATLAB路径上,请使用浏览button to locate the file.

Dependencies

要启用此参数,请设置Networkparameter toNetwork from MAT-file.

Programmatic Use

Block Parameter:NetworkFilePath
Type:character vector, string
Values:MAT-file path or name
Default:'untitled.mat'

此参数指定预磨损的复发性神经网络的MATLAB函数的名称。

Dependencies

要启用此参数,请设置Networkparameter to来自MATLAB功能的网络.

Programmatic Use

Block Parameter:NetworkFunction
Type:character vector, string
Values:Matlab功能name
Default:'untitled'

TheSample timeparameter specifies when the block computes a new output value during simulation. For details, seeSpecify Sample Time(Simulink).

指定Sample timeparameter as a scalar when you do not want the output to have a time offset. To add a time offset to the output, specify theSample timeparameter as a1-经过-2vector where the first element is the sampling period and the second element is the offset.

By default, theSample timeparameter value is-1to inherit the value.

Programmatic Use

Block Parameter:SampleTime
Type:character vector
Values:scalar | vector
Default:'-1'

Enable output portypred输出最高分的标签。

Programmatic Use

Block Parameter:Classification
Type:character vector, string
Values:'off'|'on'
Default:'on'

启用输出端口分数labelsthat output all predicted scores and associated class labels.

Programmatic Use

Block Parameter:Predictions
Type:character vector, string
Values:'off'|'on'
Default:'off'

Extended Capabilities

Introduced in R2021a