MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / WriteTextProto

Function WriteTextProto

tensorflow/core/platform/env.cc:521–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521Status WriteTextProto(Env* env, const string& fname,
522 const ::tensorflow::protobuf::Message& proto) {
523#if !defined(TENSORFLOW_LITE_PROTOS)
524 string serialized;
525 if (!::tensorflow::protobuf::TextFormat::PrintToString(proto, &serialized)) {
526 return errors::FailedPrecondition("Unable to convert proto to text.");
527 }
528 return WriteStringToFile(env, fname, serialized);
529#else
530 return errors::Unimplemented("Can't write text protos with protolite.");
531#endif
532}
533
534Status ReadTextProto(Env* env, const string& fname,
535 ::tensorflow::protobuf::Message* proto) {

Callers 7

TESTFunction · 0.85
RealMainFunction · 0.85
DumpExecutionOptionsFunction · 0.85
SetUpMethod · 0.85
WriteToFileFunction · 0.85

Calls 3

FailedPreconditionFunction · 0.85
WriteStringToFileFunction · 0.85
UnimplementedFunction · 0.85

Tested by 3

TESTFunction · 0.68
SetUpMethod · 0.68