我试图从自动编码器中获取潜在空间,以便构建情节并观察其行为。
我真的不知道我是否能从RepeatVector
得到它,或者我是否必须添加一个Dense
层
这是我的密码:
model = Sequential()
input_shape = (X_train.shape[1], X_train.shape[2])
model.add(LSTM(16, activation='relu', return_sequences=True, input_shape=input_shape)) #Encoder
model.add(LSTM(4, activation='relu', return_sequences=False)) #Encoder
model.add(RepeatVector(X_train.shape[1])) #Latent
model.add(LSTM(4, activation='relu', return_sequences=True)) #Decoder
model.add(LSTM(16, activation='relu', return_sequences=False)) #Decoder
model.add(TimeDistributed(Dense(X_train.shape[2]))) #Decoder
如何获得潜在空间表示
目前没有回答
相关问题 更多 >
编程相关推荐