| 2010 | } |
| 2011 | |
| 2012 | Status CreateStringJoinOp(const std::string& name, |
| 2013 | std::vector<SrcInfo> input_info, |
| 2014 | Graph* graph, Node** join_node) { |
| 2015 | NodeDef def; |
| 2016 | def.set_name(name); |
| 2017 | def.set_op("StringJoin"); |
| 2018 | AttrValue attr_N; |
| 2019 | attr_N.set_i(input_info.size()); |
| 2020 | def.mutable_attr()->insert({"N", attr_N}); |
| 2021 | Status status; |
| 2022 | *join_node = graph->AddNode(def, &status); |
| 2023 | TF_RETURN_IF_ERROR(status); |
| 2024 | |
| 2025 | for (size_t i = 0; i < input_info.size(); ++i) { |
| 2026 | graph->AddEdge(input_info[i].src_node, input_info[i].src_slot, |
| 2027 | *join_node, i); |
| 2028 | } |
| 2029 | |
| 2030 | return status; |
| 2031 | } |
| 2032 | |
| 2033 | Status CreateConcatOp(const std::string& name, |
| 2034 | DataType type, |