ComplexReLULayer - Complex rectified linear unit (ReLU) layer - MATLAB (original) (raw)

Main Content

Complex rectified linear unit (ReLU) layer

Since R2025a

Description

A complex ReLU layer performs a threshold operation to the real and imaginary parts of the input, where any value less than zero is set to zero.

Creation

Syntax

Description

`layer` = complexReluLayer creates a complex ReLU layer.

example

`layer` = complexReluLayer(Name=name) also sets the optional Name property using a name-value argument.

Properties

expand all

Data Types: char | string

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 complex ReLU layer.

layer = ComplexReLULayer with properties:

Name: ''

Learnable Parameters No properties.

State Parameters No properties.

Show all properties

Algorithms

expand all

A complex ReLU layer performs a threshold operation to the real and imaginary parts of the input, where any value less than zero is set to zero.

The complex ReLU operation is an element-wise operation and does not change the size of the input data. For each element of the input, the corresponding output element is

Layers in a layer array or layer graph pass data to subsequent layers as formatted dlarray objects. The format of a dlarray object is a string of characters in which each character describes the corresponding dimension of the data. The format consists of one or more of these characters:

For example, you can describe 2-D image data that is represented as a 4-D array, where the first two dimensions correspond to the spatial dimensions of the images, the third dimension corresponds to the channels of the images, and the fourth dimension corresponds to the batch dimension, as having the format "SSCB" (spatial, spatial, channel, batch).

ComplexReLULayer objects apply an element-wise operation and support input data of any format. The layer does not add or remove any dimensions, so it outputs data with the same format as its input data.

ComplexReLULayer objects support complex-valued input and outputs. The layer applies the same underlying operation to complex-valued input as it does to real-valued input and outputs complex-valued data in either case.

Version History

Introduced in R2025a