tf.keras.layers.LSTM(64, input_shape=(3, 1))
时间: 2023-10-23 16:11:15 浏览: 140
使用keras时input_shape的维度表示问题说明
This code creates an LSTM layer with 64 units and an input shape of (3,1). The input shape indicates that the layer expects a 3D tensor with shape (batch_size, timesteps, input_dim), where batch_size is the number of samples in each batch, timesteps is the number of time steps in a sequence, and input_dim is the number of features in each time step. In this case, the input_dim is 1, meaning that the layer expects a single feature at each time step. The output of this layer will be a 2D tensor with shape (batch_size, 64), where 64 is the number of units in the layer.
阅读全文