首页 > 解决方案 > 图无法按拓扑顺序排序

问题描述

当我从带有 Tensorflow 后端的 keras 运行模型时,我遇到了以下错误?

2020-03-18 16:17:19.823448: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:561] remapper failed: Invalid argument: MutableGraphView::MutableGraphView error: node 'loss/time_distributed_1_loss/categorical_crossentropy/weighted_loss/concat' has self cycle fanin 'loss/time_distributed_1_loss/categorical_crossentropy/weighted_loss/concat'.
2020-03-18 16:17:19.848935: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:717] Iteration = 0, topological sort failed with message: The graph couldn't be sorted in topological order.
2020-03-18 16:17:19.861649: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:717] Iteration = 1, topological sort failed with message: The graph couldn't be sorted in topological order.
2020-03-18 16:17:19.973071: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:561] arithmetic_optimizer failed: Invalid argument: The graph couldn't be sorted in topological order.
2020-03-18 16:17:19.982617: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:561] remapper failed: Invalid argument: MutableGraphView::MutableGraphView error: node 'loss/time_distributed_1_loss/categorical_crossentropy/weighted_loss/concat' has self cycle fanin 'loss/time_distributed_1_loss/categorical_crossentropy/weighted_loss/concat'.
2020-03-18 16:17:19.990238: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:717] Iteration = 0, topological sort failed with message: The graph couldn't be sorted in topological order.
2020-03-18 16:17:19.999968: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:717] Iteration = 1, topological sort failed with message: The graph couldn't be sorted in topological order.
2020-03-18 16:17:20.035397: W tensorflow/core/common_runtime/process_function_library_runtime.cc:697] Ignoring multi-device function optimization failure: Invalid argument: The graph couldn't be sorted in topological order.

我正在从 mac 运行,想知道是什么导致了这种情况以及如何缓解?

标签: pythontensorflow

解决方案


推荐阅读