Skip to content
Advertisement

max pooling across one dimension using keras

I have implemented a 3D-convolution neural network. The shape of my input is (500,10,4,1). I only want to convolve in first dimension such that it is ‘fully connected’ in second and third dimension in a way. So I use kernel size of (30,10,4). So far it’s fine. But when I do max pooling it reduces the second and third dimension as well. But it’s only the first dimension I want to reduce. That is after doing the max-pooling I want the first dimension (500) to become 250 but I want my second dimension and third dimension to remain 10 and 4 respectively. How can I achieve that? My code so far is :

JavaScript

ERROR When I do

JavaScript

I get the following error:

enter image description here

Insights will be appreciated.

Advertisement

Answer

try this :

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement