| 1024 | } |
| 1025 | |
| 1026 | Node* CheckReshapeNode(Node* dynamic_stitch) { |
| 1027 | Node* reshape_node = nullptr; |
| 1028 | for (const Edge* edge : dynamic_stitch->out_edges()) { |
| 1029 | if (!edge->IsControlEdge() && |
| 1030 | edge->dst()->op_def().name() == "Reshape") { |
| 1031 | if (reshape_node) { |
| 1032 | LOG(FATAL) << "Found many reshape node edges from DynamicStitch node: " |
| 1033 | << dynamic_stitch->DebugString(); |
| 1034 | } |
| 1035 | reshape_node = edge->dst(); |
| 1036 | } |
| 1037 | } |
| 1038 | |
| 1039 | if (!reshape_node) { |
| 1040 | LOG(FATAL) << "Can not found reshape node edges from DynamicStitch node: " |
| 1041 | << dynamic_stitch->DebugString(); |
| 1042 | } |
| 1043 | |
| 1044 | return reshape_node; |
| 1045 | } |
| 1046 | |
| 1047 | Node* InternalFindUniqueNode(Node* n) { |
| 1048 | std::unordered_set<Node*> pushed; |
no test coverage detected