| 60 | } |
| 61 | |
| 62 | Status SetSignatures(const Signatures& signatures, |
| 63 | tensorflow::MetaGraphDef* meta_graph_def) { |
| 64 | auto& collection_def = *(meta_graph_def->mutable_collection_def()); |
| 65 | auto* any_list = collection_def[kSignaturesKey].mutable_any_list(); |
| 66 | any_list->mutable_value()->Clear(); |
| 67 | #ifdef TENSORFLOW_LITE_PROTOS |
| 68 | signatures.SerializeToString( |
| 69 | any_list->mutable_value()->Add()->mutable_value()); |
| 70 | #else |
| 71 | any_list->mutable_value()->Add()->PackFrom(signatures); |
| 72 | #endif |
| 73 | return Status::OK(); |
| 74 | } |
| 75 | |
| 76 | Status GetClassificationSignature( |
| 77 | const tensorflow::MetaGraphDef& meta_graph_def, |