We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
medium
primitives
Implement Average Pooling 1D
Implement 1D Average Pooling.
Slide a window of size kernel_size along the input with a given stride and take the average value in each window.
Input:
-
x: 1D tensor of shape(L,) -
kernel_size: size of the pooling window (integer) -
stride: stride of the pooling window (integer)
Output: 1D tensor of shape (L_out,) where $L_{out} = \lfloor \frac{L - \text{kernel\_size}}{\text{stride}} \rfloor + 1$
Hints
pooling
cnn
basics
Sign in to attempt this problem and view the solution.