Python keras how to change the size of input after convolution layer into lstm layer

后端 未结 1 644
-上瘾入骨i
-上瘾入骨i 2020-12-17 02:49

I have a problem with the connection between convolution layer and lstm layer. The data is of shape(75,5) where there is 75 timesteps x 5 data points for each time step. Wha

相关标签:
1条回答
  • 2020-12-17 03:11

    You can add Reshape() layer in between to make dimensions compatible.

    http://keras.io/layers/core/#reshape

    keras.layers.core.Reshape(dims)

    Reshape an output to a certain shape.

    Input shape

    Arbitrary, although all dimensions in the input shaped must be fixed. Use the keyword argument input_shape (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model.

    Output shape

    (batch_size,) + dims

    Arguments

    dims: target shape. Tuple of integers, does not include the samples dimension (batch size).

    0 讨论(0)
提交回复
热议问题