Search code examples
deep-learningkeraskeras-layer

Multi-dimensional input layers in Keras


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?


Solution

  • 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.