Keras MLP在不杀死奔跑的情况下停止中期训练
我正在使用 optuna v。2.10.0
在Kerasv。2.8.0
使用Pythonv。3.9.12 < /code>用于MacOS(TensorFlow-Metalv。
0.4.0
),使用GPU和在训练试验期间的随机点处,进度停止,GPU使用情况下却一无所有,但是该程序没有结束。我不知道是什么原因引起的。 n_trials
和超时
设置为相当大的值。
在运行控制台中可见的最后一行:
Epoch 103/350
208/208 [==============================] - 2s 10ms/step - loss: 2.3030 - accuracy: 0.1017 - val_loss: 2.3030 - val_accuracy: 0.0978
Epoch 104/350
208/208 [==============================] - 2s 9ms/step - loss: 2.3030 - accuracy: 0.1018 - val_loss: 2.3030 - val_accuracy: 0.0978
Epoch 105/350
56/208 [=======>......................] - ETA: 1s - loss: 2.3030 - accuracy: 0.1027
这始终发生在第一次审判中。
更新:
当不使用Optuna时,这也会发生。这个过程只是在一个时代的中间停止,就好像它在等待某事,并且仍然如此。
I am using optuna v.2.10.0
on a keras v.2.8.0
MLP using Python v.3.9.12
for macOS (tensorflow-metal v.0.4.0
), using GPU and at a random point during training of a trial the progress just stops, the GPU usage drops to nothing, but the program doesn't end. I don't know what is causing this. n_trials
and timeout
are set at a considerable value.
Final lines visible in the run console:
Epoch 103/350
208/208 [==============================] - 2s 10ms/step - loss: 2.3030 - accuracy: 0.1017 - val_loss: 2.3030 - val_accuracy: 0.0978
Epoch 104/350
208/208 [==============================] - 2s 9ms/step - loss: 2.3030 - accuracy: 0.1018 - val_loss: 2.3030 - val_accuracy: 0.0978
Epoch 105/350
56/208 [=======>......................] - ETA: 1s - loss: 2.3030 - accuracy: 0.1027
This has always happened in the first trial.
Update:
This also happens when not using optuna. The process just stops in the middle of an epoch, as if it is waiting for something and remains like that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯...没有Optuna 使用相同的超参数配置吗?我怀疑Optuna对恶意参数配置(例如模型太大)。
Hmm... Doesn't the hang happen without Optuna with the same hyperparameter configuration? I suspect that a malicious parameter configuration (e.g. model is too large) is sampled by Optuna.