使用培训的深度学习神经网络预测响应
You can make predictions using a trained neural network for deep learning on either a CPU or GPU.使用GPU需要并行计算工具箱™和CUDA®启用nvidia.®GPU with compute capability 3.0 or higher.Specify the hardware requirements using theexecultenvironment.
name-value pair argument.
[ypred1,...,ypredm] =预测(___)
预测s responses for theM
outputs of a multi-output network using any of the previous syntaxes. The outputypredj.
对应于网络输出net.outputnames(j)
。To return categorical outputs for the classification output layers, set the'ReturnCategorical'
option to真正
。
___=预测(___,
预测s responses with additional options specified by one or more name-value pair arguments.名称,Value
)
Tip
当用不同长度的序列进行预测时,迷你批量大小可以影响添加到的输入数据的填充量,这导致不同的预测值。尝试使用不同的值,以查看最适合您的网络。要指定迷你批量大小和填充选项,请使用'minibatchsize'
和'SequenceLength'
选项分别。
如果图像数据包含NaN
S,预测
通过网络传播它们。如果网络具有Relu层,则这些图层忽略了NaN
s。但是,如果网络没有Relu层,那么预测
将NAN返回预测。
深度学习培训,预测和验证的所有功能,深度学习工具箱™使用单精度浮点算术执行计算。深度学习的功能包括trainNetwork
,预测
,分类
, and激活
。当您使用CPU和GPU培训网络时,该软件使用单精度算术。
You can compute the predicted scores and the predicted classes from a trained network using分类
。
You can also compute the activations from a network layer using激活
。
对于序列到标签和序列到序列分类网络(例如,LSTM网络),您可以使用预测和更新网络状态classifyandupdateState.
和predictandanddatestate.
。
[1] M. Kudo,J. Toyama和M. Shimbo。“使用过度区域的多维曲线分类。”模式识别字母。卷。20,第11-13页,第1103-1111页。
[2]UCI Machine Learning Repository: Japanese Vowels Dataset。https://archive.ics.uci.edu/ml/datasets/japanese+vowels.