1.Keras.layer.LSTM()
return_sequences
= True返回整个序列,每一个time step都会输出
= False只返回输出序列的最后一个time step的输出
2.ValueError: A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 128, 16), (None, 1024, 32)]
调参调到输入维度最多只有一个维度不一致
3.训练集reshape
#原(60000,28,28)以mnist手写数字为例
x_train = x_train.reshape(x_train.shape[0] , -1)
#x_train.shape[0]=60000,-1=自动调整到合适的维度(也可直接写784)
#现(60000,784)
4.数据处理归一化