Multi-dimensional input layers in Keras

我是研究僧i 提交于 2019-12-01 09:46:55

问题


Which layers in Keras can be used as a first layer to take in multi-dimensional features? I'd like to use a dense layer with 1275 features that have 11 channels, but it looks like I can only use convolutional layers or recurrent layers for features of 2 or more dimensions. Is that correct?


回答1:


As far as I know you are correct, but you could reshape your data to have 1275 * 11 features and then run a dense layer on top of it. There is a Reshape Layer (https://keras.io/layers/core/#reshape) and a Flatten Layer (https://keras.io/layers/core/#flatten).

For a dense layer you normally flatten your input first.



来源:https://stackoverflow.com/questions/40646529/multi-dimensional-input-layers-in-keras

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!