主要内容

SoftMaxlayer

描述

SoftMax层将SoftMax函数应用于输入。

创建

描述

= SoftMaxlayer创建一个软磁层。

例子

= softmaxlayer('name',姓名Creates a softmax layer and sets the optional姓名使用名称值对的属性。例如,SoftMaxlayer('name','sm1')创建一个名称的SoftMax层'SM1'。将属性名称包装在单引号中。

特性

展开全部

图层名称,,,,specified as a character vector or a string scalar. For数组输入,火车网,,,,一个ssembleNetwork,,,,LayerGraph, 和dlnetwork功能自动将名称分配给具有名称的图层''

数据类型:char|细绳

此属性仅阅读。

输入数量of the layer. This layer accepts a single input only.

数据类型:双倍的

此属性仅阅读。

层的输入名称。该层仅接受单个输入。

数据类型:细胞

此属性仅阅读。

层的输出数。该层仅具有单个输出。

数据类型:双倍的

此属性仅阅读。

输出名称of the layer. This layer has a single output only.

数据类型:细胞

例子

全部收缩

创建一个名称'sm1'

layer = softmaxlayer('姓名',,,,'SM1'
layer = softmaxlayer具有属性:名称:'sm1'

Include a softmax layer in a大批。

层= [...imageInputlayer([28 28 1])卷积2Dlayer(5,20)Relulayer MaxPooling2Dlayer(2,“大步”,2)完整连接的layerer(10)SoftMaxlayer分类器]
层x1 = 7层阵列层:1”的形象nput 28x28x1 images with 'zerocenter' normalization 2 '' Convolution 20 5x5 convolutions with stride [1 1] and padding [0 0 0 0] 3 '' ReLU ReLU 4 '' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 5 '' Fully Connected 10 fully connected layer 6 '' Softmax softmax 7 '' Classification Output crossentropyex

更多关于

展开全部

References

[1] Bishop,C。M.模式识别和机器学习。纽约州施普林格,纽约,2006年。

扩展功能

C/C ++代码生成
使用MATLAB®CODER™生成C和C ++代码。

GPU代码生成
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

版本历史记录

在R2016a中引入