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

Function IsValidDataInputName

tensorflow/core/framework/node_def_util.cc:763–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761}
762
763bool IsValidDataInputName(StringPiece sp) {
764 // Data inputs are op_name, op_name:0, or op_name:12345.
765 Scanner scan(sp);
766 scan.One(Scanner::LETTER_DIGIT_DOT)
767 .Any(Scanner::LETTER_DIGIT_DASH_DOT_SLASH_UNDERSCORE);
768 if (scan.Peek() == ':') {
769 scan.OneLiteral(":");
770 if (scan.Peek() == '0') {
771 scan.OneLiteral("0"); // :0
772 } else {
773 scan.Many(Scanner::DIGIT); // :[1-9][0-9]*
774 }
775 }
776 scan.Eos();
777
778 return scan.GetResult();
779}
780
781bool IsValidControlInputName(StringPiece sp) {
782 return Scanner(sp)

Callers 1

ValidateOpInputFunction · 0.85

Calls 3

OneMethod · 0.45
PeekMethod · 0.45
GetResultMethod · 0.45

Tested by

no test coverage detected