Average Pooling 3D Layer - 3-D average pooling layer - Simulink (original) (raw)

3-D average pooling layer

Since R2024b

Libraries:
Deep Learning Toolbox / Deep Learning Layers / Pooling Layers

Description

The Average Pooling 3D Layer block performs downsampling by dividing three-dimensional input into cuboidal pooling regions, then computing the average values of each region. This block accepts 3-D image data in the SSSC format (four dimensions corresponding to three spatial dimensions and one channel dimension, in that order) and pools over the spatial dimensions.

The exportNetworkToSimulink function generates this block to represent an averagePooling3dLayer object.

Limitations

Ports

Input

expand all

Input data to downsample. The data must have four dimensions corresponding to three spatial dimensions and one channel dimension, in that order.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point

Output

expand all

The result of downsampling the input data. The output data has four dimensions corresponding to three spatial dimensions and one channel dimension, in that order.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fixed point

Parameters

expand all

To edit block parameters interactively, use theProperty Inspector. From the Simulink® Toolstrip, on the Simulation tab, in thePrepare gallery, select Property Inspector.

Main

Specify the name of a workspace variable that contains anaveragePooling3dLayer object from a trained network. TheAverage Pooling 3D Layer block configures itself by using the properties of the object.

Programmatic Use

Block Parameter: Layer
Type: workspace variable
Values: averagePooling3dLayer object
Default: 'layerObject'
Type: workspace variable

Data format for the input data. The options use the same notation as the fmt argument of thedlarray object, except layer blocks do not support the Batch (B) dimension and instead assume an observation number of1.

Programmatic Use

Block Parameter: DataFormat
Type: character vector
Values: 'SSSC'
Default: 'SSSC'

Data Types

Minimum value of the output range that the software checks.

The software uses the minimum value to perform:

Tips

Output minimum does not saturate or clip the actual output signal. Use the Saturation (Simulink) block instead.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: OutMin
Values: '[]' (default) | scalar in quotes

Maximum value of the output range that the software checks.

The software uses the maximum value to perform:

Tips

Output maximum does not saturate or clip the actual output signal. Use the Saturation (Simulink) block instead.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: OutMax
Values: '[]' (default) | scalar in quotes

Choose the data type for the output. The type can be inherited, specified directly, or expressed as a data type object such as Simulink.NumericType. When you select Inherit: Inherit via internal rule, Simulink chooses a data type to balance numerical accuracy, performance, and generated code size, while taking into account the properties of the embedded target hardware.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: OutDataTypeStr
Values: 'Inherit: Inherit via internal rule' (default) | 'Inherit: Keep MSB' 'Inherit: Match scaling' 'Inherit: Inherit via back propagation' 'Inherit: Same as first input'

Select this parameter to prevent the fixed-point tools from overriding the Output data type you specify on the block. For more information, see Use Lock Output Data Type Setting (Fixed-Point Designer).

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: LockScale
Values: 'off' (default) | 'on'

Specify the rounding mode for fixed-point operations. For more information, see Rounding Modes (Fixed-Point Designer).

Block parameters always round to the nearest representable value. To control the rounding of a block parameter, enter an expression using a MATLAB® rounding function in the mask field.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: RndMeth
Values: 'Floor' (default) | 'Ceiling' 'Convergent' 'Nearest' 'Round' 'Simplest' 'Zero'

Specify whether integer overflows saturate or wrap.

For example, the maximum value that the signed 8-bit integer int8 can represent is 127. Any block operation result greater than the maximum value causes overflow of the 8-bit integer.

Tips

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: SaturateOnIntegerOverflow
Values: 'off' (default) | 'on'

Choose the data type of the accumulator of the Sum of Elements block AvgPooling/Sum of Elements inside the Average Pooling 3D Layer block. The type can be inherited, specified directly, or expressed as a data type object such as Simulink.NumericType. When you select Inherit: Inherit via internal rule, Simulink chooses a data type to balance numerical accuracy, performance, and generated code size, while taking into account the properties of the embedded target hardware.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: AccumDataTypeStr
Values: 'Inherit: Inherit via internal rule' (default) | 'Inherit: Same as first input'

Choose the data type for the output of the Constant blockAvgPooling/NumPoolingElements inside the Average Pooling 3D Layer block. The type can be inherited, specified directly, or expressed as a data type object such as Simulink.NumericType.

The NumPoolingElements Constant block computes the number of pooling elements by calculating the product of the elements of the PoolSize property of the object that you specify with the Layer parameter.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: NumPoolingElementsDataTypeStr
Values: 'Inherit: Inherit via back propagation' (default) | 'Inherit: Inherit from 'Constant value''

Execution

Specify the discrete interval between sample time hits or specify another type of sample time, such as continuous (0) or inherited (-1). For more options, see Types of Sample Time (Simulink).

By default, the block inherits its sample time based on the context of the block within the model.

Programmatic Use

To set the block parameter value programmatically, use the set_param (Simulink) function.

Parameter: SampleTime
Data Types: char
Values: '-1' (default) | scalar

Extended Capabilities

Version History

Introduced in R2024b

expand all

Starting in R2025a, the default value for the Layer parameter is 'layerObject'. In previous versions, the default value is 'layer'. If you have code that programmatically creates Simulink and relies on variables with the name 'layer', update your code so that the variable has the name 'layerObject'.