主要内容

zreluLayer

ZReLU Layer

Since R2026a

    Description

    A zReLU layer performs a threshold operation to complex inputs, where any value with negative real or imaginary part is set to zero.

    Creation

    Description

    layer = zreluLayer creates a zReLU layer.

    layer = zreluLayer(Name=name) creates a zReLU layer and sets the optional Name property using a name-value pair.

    example

    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. For Layer array input, the trainnet and dlnetwork functions automatically assign names to unnamed layers.

    Data Types: char

    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 zReLU layer with the name 'zrelu1'.

    layer = zreluLayer(Name="zrelu1")
    layer = 
      ZReLULayer with properties:
    
        Name: 'zrelu1'
    
    

    Create a layer array including a sequence input layer and two complex fully connected layers separated by a zReLU layer.

    layers = [...
        sequenceInputLayer(100), ...
        complexFullyConnectedLayer(10), ...
        zreluLayer, ...
        complexFullyConnectedLayer(1), ...
        ];

    Convert the layer array to a dlnetwork object.

    net = dlnetwork(layers);

    Create random sample complex sequence data.

    data = randn(1,100) + 1i * randn(1,100);

    Compute the output of the untrained network.

    predict(net,data)
    ans = single
    
    -0.2372 + 0.5038i
    

    More About

    expand all

    Version History

    Introduced in R2026a