def Gen():
#Generator model
G = Sequential()
G.add(TimeDistributed(Dense(x_dash.shape[2]), input_shape=(x_dash.shape[1],x_dash.shape[2])))
G.add(LSTM(216, return_sequences=True))
G.add(Dropout(0.3))
G.add(LSTM(216, return_sequences=True))
G.add(Dropout(0.3))
G.add(LSTM(216, return_sequences=True))
#G.add(BatchNormalization(momentum=0.9))
G.add(TimeDistributed(Dense(y_dash.shape[2], activation='softmax')))
G.compile(loss='categorical_crossentropy', optimizer=Adam(lr=2e-4))
return G
评论列表
文章目录