Main Content

softplusLayer

Softplus layer

    Description

    A softplus layer applies the softplus activation function on the layer inputs.

    Creation

    Description

    layer = softplusLayer creates a softplus layer.

    example

    layer = softplusLayer(Name=name) also sets the layer name. For example, Name="splus" sets the layer name to "splus".

    Input Arguments

    expand all

    Layer name, specified as a character vector or a string scalar. For Layer array input, the trainnet and dlnetwork functions automatically assign names to unnamed layers.

    This argument sets the Name property.

    Data Types: char | string

    Properties

    expand all

    Layer name, specified as a character vector or a string scalar. For Layer array input, the trainnet and dlnetwork functions automatically assign names to unnamed layers.

    The SoftplusLayer object stores this property as a character vector.

    Data Types: char | string

    This property is read-only.

    One-line description of the layer, stored as 'Softplus'. This description appears when you display a Layer array and when you use the analyzeNetwork function.

    This property is read-only.

    Type of the layer, stored as 'Softplus'. The type appears when you display a Layer array and when you use the analyzeNetwork function.

    This property is read-only.

    Number of inputs to the layer, stored as 1. This layer accepts a single input only.

    Data Types: double

    This property is read-only.

    Input names, stored as {'in'}. This layer accepts a single input only.

    Data Types: cell

    This property is read-only.

    Number of outputs from the layer, stored as 1. This layer has a single output only.

    Data Types: double

    This property is read-only.

    Output names, stored as {'out'}. This layer has a single output only.

    Data Types: cell

    Examples

    collapse all

    Create a softplus layer with the name "splus".

    layer = softplusLayer(Name="splus")
    layer = 
      SoftplusLayer with properties:
    
        Name: 'splus'
    
       Learnable Parameters
        No properties.
    
       State Parameters
        No properties.
    
      Show all properties
    
    

    Include a softplus layer in a layer array.

    layers = [
        featureInputLayer(10)
        fullyConnectedLayer(12)
        softplusLayer];

    Algorithms

    expand all

    Extended Capabilities

    expand all

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    GPU Code Generation
    Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

    Version History

    Introduced in R2020a

    expand all