AveragePooling2DLayer
Bases: _Pooling2DLayer
An average pooling 2D Layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kernel_size
|
int
|
the size of the kernel |
required |
stride
|
int
|
the stride of the pooling |
-1
|
padding
|
int
|
the padding of the pooling |
0
|
Attributes:
| Name | Type | Description |
|---|---|---|
input_size |
ModelImageSize
|
Get the input_size of this layer. |
output_size |
ModelImageSize
|
Get the output_size of this layer. |
Source code in src/safeds/ml/nn/layers/_pooling2d_layer.py
input_size
¶
Get the input_size of this layer.
Returns:
| Name | Type | Description |
|---|---|---|
result |
ModelImageSize
|
The amount of values being passed into this layer. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input_size is not yet set |
output_size
¶
Get the output_size of this layer.
Returns:
| Name | Type | Description |
|---|---|---|
result |
ModelImageSize
|
The number of neurons in this layer. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the input_size is not yet set |