Max Pool Time in Keras

I use CNN in Kerasfor the NLP task and instead of max merging, I am trying to reach max pool time.

Any ideas / hacks on how to achieve this?

What I mean by maximum pool time is the union of the maximum value, regardless of where they are in the vector

+4
source share
2 answers

Assuming your data form (batch_size, seq_len, features), you can apply:

seq_model = Reshape((seq_len * features, 1))(seq_model)
seq_model = GlobalMaxPooling1D()(seq_model)
+3
source

. , .

:

seq_model = Permute((2, 1))(seq_model)

seq_model = MaxPooling1D()(seq_model)
0

Source: https://habr.com/ru/post/1668391/


All Articles