技术解析
这是我想转换为 pytorch 的示例 keras 代码!下图为模型结构 https://file.nuomiphp.com/uploads/20210413/FmdyObK_bDET2ChmVw44z33QaYGO.png
代码如下: model = Sequential() model.add(LSTM(input_dim=1, units=50, return_sequences=True)) #model.add(Dropout(0.2)) model.add(LSTM(input_dim=50, units=100, return_sequences=True)) #model.add(Dropout(0.2)) model.add(LSTM(input_dim=100, units=200, return_抗投诉服务器sequences=True)) #model.add(Dropout(0.2)) model.add(LSTM(300, return_sequences=False)) model.add(Dropout(0.2)) model.add(Dense(100)) model.add(Dense(units=1)) model.add(Activation('relu')) model.compile(loss='mean_squared_error', optimizer='Adam') model.summary()
希望有人能解答一下,非常感谢!