dlhdl.layer.mishLayer
Description
Use mishLayer
objects to apply the mish function to the layer
inputs.
This equation describes the mish operation:
Creation
Properties
Name
— Layer name
""
(default) | character vector | string scalar
NumInputs
— Number of inputs
1
(default)
This property is read-only.
Number of inputs to the layer, returned as 1
. This layer accepts a
single input only.
Data Types: double
InputNames
— Input names
{'in'}
(default)
This property is read-only.
Input names, returned as {'in'}
. This layer accepts a single input
only.
Data Types: cell
NumOutputs
— Number of outputs
1
(default)
This property is read-only.
Number of outputs from the layer, returned as 1
. This layer has a
single output only.
Data Types: double
OutputNames
— Output names
{'out'}
(default)
This property is read-only.
Output names, returned as {'out'}
. This layer has a single output
only.
Data Types: cell
Examples
Create Mish Layer
Create a mish layer with the name "mish1"
.
layer = dlhdl.layer.mishLayer("mish1")
layer = mishLayer with properties: Name: 'mish1' Learnable Parameters No properties. State Parameters No properties. Show all properties
Include the mish layer in a Layer
array.
layers = [imageInputLayer([20,20,3],'Normalization',"none",'Name','input') convolution2dLayer([5 5],3,'Padding',[1 2 1 2],'Stride',[1 1],'Name', 'conv') batchNormalizationLayer('Name','batchnorm') dlhdl.layer.mishLayer("mish1") convolution2dLayer([5 5],3,'Padding',[1 2 1 2],'Stride',[2 2],'Name', 'conv') batchNormalizationLayer('Name','batchnorm') swishLayer('Name','swish')]
layers = 7×1 Layer array with layers: 1 'input' Image Input 20×20×3 images 2 'conv' 2-D Convolution 3 5×5 convolutions with stride [1 1] and padding [1 2 1 2] 3 'batchnorm' Batch Normalization Batch normalization 4 'mish1' dlhdl.layer.mishLayer Custom mish Layer 5 'conv' 2-D Convolution 3 5×5 convolutions with stride [2 2] and padding [1 2 1 2] 6 'batchnorm' Batch Normalization Batch normalization 7 'swish' Swish Swish
Algorithms
Mish Layer
A mish activation layer applies the mish function to the layer inputs. The mish operation uses this equation
The mish layer does not change the size of the input. Activation layers such as mish layers improve the training accuracy for some applications and usually follow convolution and normalization layers. Other nonlinear activation layers perform different operations. For a list of activation layers, see Activation Layers.
Version History
Introduced in R2024a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)