【发布时间】:2020-12-31 02:57:31
【问题描述】:
我正在使用 optuna 包来优化我的模型,并且我正在使用一次运行多个作业的选项。当我运行它时,我得到:
Trial failed because of the following error: ValueError('The name "dense" is used 3 times in the model. All layer names should be unique.'
但我没有为图层分配任何名称。我有tensorflow.keras.backend.clear_session(),当我删除它时,我不再收到错误消息。可以删除它吗?有什么影响?还有其他解决办法吗?
【问题讨论】:
-
层名应该是唯一的,为了更清楚,你应该分享你的模型。
-
@ashraful ,正如我所说,我没有给图层命名,keras 会自动创建它们。当我只使用工作时,我没有收到错误。我无法提供模型,因为代码很难理解并且包含很多模块。
标签: python keras tensorflow2.0