我知道LSTMS需要一个三维数据集来遵循这种格式,N_samples x TimeSteps x Variables。我希望将所有行的单个时间步长的数据重构为按小时计算的滞后时间步长。数据是1秒记录中的时间序列数据,并且已经经过预处理,在0-1的范围内,1-热编码,清理等。X_test = X_test.reshape((X_test.shape[0], 1, X_test.shape[1])) - Old method for 1 timestep
#Generate Lagtime Steps 3D
下面是我想对这些数据进行培训的模型:model.add((LSTM(nums-1,return_sequences=True,input_shape=(20,15,4), activation='relu')))ValueError: Input 0 is incompatible with layer <e
根据Udemy教程,我正在keras中实现一个LSTM网络。在教程视频中,代码正在运行,但当我自己运行它时,它得到的错误是:training_set_scaled = sc.fit_transform(training_set)
#Creating a Data Structure with 60 timesteps</em
This is per sample, 3200 samples我想要构建一个NN,这样最后一个维度(类别)将通过一个输出大小为8的嵌入层,然后连接回前两个dims所以,这会是这样的:input2 = keras.layers.Input1], [2]
x = concatenate([input1,x2]) #will get 10 dims at eac