这是我的训练集的一个例子。
k1, k2, k3, k4, k5, k6, k7, k8, k9, k10
48, 45, 0, 0, 0, 0, 0, 0, 41, 30
0, 0, 0, 0, 0, 0, 0, 0, 0, 34
46, 0, 0, 0, 0, 0, 0, 0, 0, 39
48, 0, 0, 0, 0, 0, 0, 0, 0, 41
47, 0, 0, 0, 0, 0, 0, 0, 48, 43
...
每一行代表一个时间戳。我认为数据集的时间类型在LSTM中是很好的,所以我训练了具有多层LSTM的神经网络,并期望有一组新的数据。我将数据集按比例缩小到[0,1]
的范围,然后再将其输入模型。在训练了800个纪元(批处理大小为40个纪元)之后,数据集中产生的每一行都没有变化。这是缩放到原始范围后的最新输出。
array([[7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
[7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
[7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
[7, 7, 7, 7, 7, 7, 7, 7, 7, 7],
...
我编译的神经网络模型就是这样
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
lstm_1 (LSTM) (None, 10, 1200) 5812800
_________________________________________________________________
lstm_2 (LSTM) (None, 10, 1200) 11524800
_________________________________________________________________
dropout_1 (Dropout) (None, 10, 1200) 0
_________________________________________________________________
lstm_3 (LSTM) (None, 10, 1200) 11524800
_________________________________________________________________
lstm_4 (LSTM) (None, 1200) 11524800
_________________________________________________________________
dropout_2 (Dropout) (None, 1200) 0
_________________________________________________________________
dense_1 (Dense) (None, 1000) 1201000
_________________________________________________________________
dense_2 (Dense) (None, 1000) 1001000
_________________________________________________________________
dropout_3 (Dropout) (None, 1000) 0
_________________________________________________________________
dense_3 (Dense) (None, 1000) 1001000
_________________________________________________________________
dense_4 (Dense) (None, 1000) 1001000
_________________________________________________________________
dropout_4 (Dropout) (None, 1000) 0
_________________________________________________________________
dense_5 (Dense) (None, 10) 10010
=================================================================
Total params: 44,601,210
Trainable params: 44,601,210
Non-trainable params: 0
_________________________________________________________________
据我了解,节点和隐藏层的数量越多,精度越高。
我的程序/理解不正确吗?我该怎么做才能改善我的模型?