How to implement a middle pool in Keras

There seems to be no built-in mid-pool level support for RNN in Keras. Does anyone know how to wrap it?

enter image description here http://deeplearning.net/tutorial/lstm.html

+5
source share
1 answer

Keras has an AveragePooling1D layer for this. If you are using a graphical API, you should do something like:

 model.add_node(AveragePooling1D(...), inputs=['h0', 'h1', ..., 'hn'], merge_mode='concat', ...) 
+6
source

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


All Articles