convolutional
Convolutional Layers API
This module provides classes to build convolutional layers.
Functions:
Please refer to Keras Convolutional Layers for additional layers.
Functions
conv2d
conv2d(filters: int, kernel_size: int | tuple[int, int] = 3, strides: int | tuple[int, int] = 1, padding: str = 'same', use_bias: bool = False, groups: int = 1, dilation: int = 1, name: str | None = None) -> keras.Layer
2D convolutional layer
Parameters:
-
filters
(int
) –Number of filters
-
kernel_size
(int | tuple[int, int]
, default:3
) –Kernel size. Defaults to 3.
-
strides
(int | tuple[int, int]
, default:1
) –Stride length. Defaults to 1.
-
padding
(str
, default:'same'
) –Padding. Defaults to "same".
-
use_bias
(bool
, default:False
) –Add bias. Defaults to False.
-
groups
(int
, default:1
) –Number of groups. Defaults to 1.
-
dilation
(int
, default:1
) –Dilation rate. Defaults to 1.
-
name
(str | None
, default:None
) –Layer name. Defaults to None.
Returns:
-
Layer
–keras.Layer: Functional 2D conv layer
Source code in neuralspot_edge/layers/convolutional.py
conv1d
conv1d(filters: int, kernel_size: int = 3, strides: int = 1, padding: str = 'same', use_bias: bool = False, name: str | None = None) -> keras.Layer
1D convolutional layer using 2D convolutional layer
Parameters:
-
filters
(int
) –Number of filters
-
kernel_size
(int
, default:3
) –Kernel size. Defaults to 3.
-
strides
(int
, default:1
) –Stride length. Defaults to 1.
-
padding
(str
, default:'same'
) –Padding. Defaults to "same".
-
use_bias
(bool
, default:False
) –Add bias. Defaults to False.
-
name
(str | None
, default:None
) –Layer name. Defaults to None.
Returns:
-
Layer
–keras.Layer: Functional 1D conv layer