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

Function GetNodeAttr

tensorflow/core/util/padding.cc:24–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace tensorflow {
23
24Status GetNodeAttr(const NodeDef& node_def, StringPiece attr_name,
25 Padding* value) {
26 string str_value;
27 TF_RETURN_IF_ERROR(GetNodeAttr(node_def, attr_name, &str_value));
28 if (str_value == "SAME") {
29 *value = SAME;
30 } else if (str_value == "VALID") {
31 *value = VALID;
32 } else if (str_value == "EXPLICIT") {
33 *value = EXPLICIT;
34 } else {
35 return errors::NotFound(str_value, " is not an allowed padding type");
36 }
37 return Status::OK();
38}
39
40Status CheckValidPadding(Padding padding_type,
41 const std::vector<int64>& explicit_paddings,

Callers 15

ObtainTensorSliceFunction · 0.50
SparsifyGatherInternalFunction · 0.50
DumpRemoteFusedGraphFunction · 0.50
GetShardingFromNodeDefFunction · 0.50
ExtractWhileLoopFramesFunction · 0.50
RunMethod · 0.50
FunctionalizeLoopFunction · 0.50
CompileFunctionMethod · 0.50
BuildIfNodeMethod · 0.50
AddIdentityNodeMethod · 0.50
RewriteAndPruneGraphFunction · 0.50

Calls 1

NotFoundFunction · 0.85

Tested by 15

TESTFunction · 0.40
FindIfThenAndElseFunction · 0.40
FindWhileCondAndBodyFunction · 0.40
HasGuaranteeConstAttrFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
TEST_FFunction · 0.40
GetXlaInternalScopesFunction · 0.40
CreateResourceMethod · 0.40
VerifyResourceMethod · 0.40
TESTFunction · 0.40
TEST_FFunction · 0.40