| 655 | } |
| 656 | |
| 657 | Node* EmptyConst(const GraphDefBuilder::Options& options) { |
| 658 | if (options.HaveError()) return nullptr; |
| 659 | NodeBuilder node_builder(options.GetNameForOp("Const"), "Const", |
| 660 | options.op_registry()); |
| 661 | const DataType dt = DataTypeToEnum<float>::v(); |
| 662 | TensorProto proto; |
| 663 | proto.set_dtype(dt); |
| 664 | TensorShape empty_shape({0}); |
| 665 | empty_shape.AsProto(proto.mutable_tensor_shape()); |
| 666 | node_builder.Attr("dtype", dt).Attr("value", proto); |
| 667 | return options.FinalizeBuilder(&node_builder); |
| 668 | } |
| 669 | |
| 670 | // A dummy const node for control flow. |
| 671 | Node* AddControlConst(const string& device_name, |
no test coverage detected