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

Function OpHasDocs

tensorflow/core/api_def/update_api_def.cc:72–92  ·  view source on GitHub ↗

Returns true if op has any description or summary.

Source from the content-addressed store, hash-verified

70
71// Returns true if op has any description or summary.
72bool OpHasDocs(const OpDef& op) {
73 if (!op.summary().empty() || !op.description().empty()) {
74 return true;
75 }
76 for (const auto& arg : op.input_arg()) {
77 if (!arg.description().empty()) {
78 return true;
79 }
80 }
81 for (const auto& arg : op.output_arg()) {
82 if (!arg.description().empty()) {
83 return true;
84 }
85 }
86 for (const auto& attr : op.attr()) {
87 if (!attr.description().empty()) {
88 return true;
89 }
90 }
91 return false;
92}
93
94// Returns true if summary and all descriptions are the same in op1
95// and op2.

Callers 1

CreateApiDefsFunction · 0.85

Calls 4

descriptionMethod · 0.80
attrMethod · 0.80
emptyMethod · 0.45
summaryMethod · 0.45

Tested by

no test coverage detected