且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Keras中实现平均池化层

更新时间:2023-11-13 17:26:58

Keras为此提供了一层AveragePooling1D.如果使用图谱API,则应该能够执行以下操作:

Keras has a layer AveragePooling1D for that. If you use the graph API, you should be able to do something like:

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