| 493 | } |
| 494 | |
| 495 | void MoveAttrValue(std::vector<string>&& value, AttrValue* out) { |
| 496 | out->mutable_list()->Clear(); // Create list() even if value empty. |
| 497 | for (auto& v : value) { |
| 498 | out->mutable_list()->add_s(std::move(v)); |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | void SetAttrValue(const TensorShape& value, AttrValue* out) { |
| 503 | value.AsProto(out->mutable_shape()); |