为了账号安全,请及时绑定邮箱和手机立即绑定

keras 提取最佳值损失

keras 提取最佳值损失

倚天杖 2021-06-07 06:54:24
网络就像inp=Input((1,12))dense0=GRU(200,activation='relu',recurrent_dropout=0.2,return_sequences=True)(inp)drop0=Dropout(0.3)(dense1)dense1=GRU(200,activation='relu',recurrent_dropout=0.2)(drop0)drop1=Dropout(0.3)(dense1)dense1=Dense(200,activation='relu')(inp)drop1=Dropout(0.3)(dense1)dense2=Dense(200,activation='relu')(drop1)drop2=Dropout(0.3)(dense2)dense3=Dense(100,activation='relu')(drop2)drop3=Dropout(0.3)(dense3)out=Dense(6,activation='relu')(drop2)md=Model(inputs=inp,outputs=out)##md.summary()opt=keras.optimizers.rmsprop(lr=0.000005)md.compile(opt,loss='mean_squared_error')esp=EarlyStopping(patience=90, verbose=1, mode='auto')md.fit(x_train.reshape((8105,1,12)),y_train.reshape((8105,1,6)),batch_size=2048,epochs=1500,callbacks=[esp], validation_split=0.2)输出:    Epoch 549/1500    6484/6484 [==============================] - 0s 13us/step - loss: 0.0589 - val_loss: 0.0100    Epoch 550/1500    6484/6484 [==============================] - 0s 10us/step - loss: 0.0587 - val_loss: 0.0099    Epoch 551/1500    6484/6484 [==============================] - 0s 12us/step - loss: 0.0584 - val_loss: 0.0100    Epoch 552/1500    6484/6484 [==============================] - 0s 12us/step - loss: 0.0593 - val_loss: 0.0100    Epoch 553/1500    6484/6484 [==============================] - 0s 12us/step - loss: 0.0584 - val_loss: 0.0100    Epoch 554/1500    6484/6484 [==============================] - 0s 15us/step - loss: 0.0587 - val_loss: 0.0101    Epoch 555/1500    6484/6484 [==============================] - 0s 12us/step - loss: 0.0583 - val_loss: 0.0100    Epoch 556/1500    6484/6484 [==============================] - 0s 13us/step - loss: 0.0578 - val_loss: 0.0101
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 174 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信