| 106 | } |
| 107 | |
| 108 | Node* UnaryOp(const string& op_name, NodeOut input, |
| 109 | const GraphDefBuilder::Options& opts) { |
| 110 | if (opts.HaveError()) return nullptr; |
| 111 | NodeBuilder node_builder(opts.GetNameForOp(op_name), op_name, |
| 112 | opts.op_registry()); |
| 113 | node_builder.Input(std::move(input)); |
| 114 | return opts.FinalizeBuilder(&node_builder); |
| 115 | } |
| 116 | |
| 117 | Node* BinaryOp(const string& op_name, NodeOut a, NodeOut b, |
| 118 | const GraphDefBuilder::Options& opts) { |