Softplus layer for actor or critic network
A softplus layer applies the softplus activation function Y = log(1 +
eX), which ensures that the output is always positive. This activation function is
a smooth continuous version of
reluLayer. You can
incorporate this layer into the deep neural networks you define for actors in reinforcement
learning agents. This layer is useful for creating continuous Gaussian policy deep neural
networks, for which the standard deviation output must be positive.
Name — Name of layer
'softplus' (default) | character vector
Name of layer, specified as a character vector. To include a layer in a layer graph,
you must specify a nonempty unique layer name. If you train a series network with this
Name is set to
'', then the software
automatically assigns a name to the layer at training time.
Description — Description of layer
'Softplus layer' (default) | character vector
This property is read-only.
Description of layer, specified as a character vector. When you create the softplus layer, you can use this property to give it a description that helps you identify its purpose.
Create Softplus Layer
Create s softplus layer object.
sLayer = softplusLayer;
You can specify the name of the softplus layer. For example, if the softplus layer represents the standard deviation of a Gaussian policy deep neural network, you can specify an appropriate name.
sLayer = softplusLayer(Name="stddev")
sLayer = SoftplusLayer with properties: Name: 'stddev' Learnable Parameters No properties. State Parameters No properties. Use properties method to see a list of all properties.
You can incorporate
sLayer into an actor network for reinforcement learning.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Introduced in R2020a