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

Function AddDefaultsToNodeDef

tensorflow/core/framework/node_def_util.cc:732–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732void AddDefaultsToNodeDef(const OpDef& op_def, NodeDef* node_def) {
733 for (const auto& attr_def : op_def.attr()) {
734 AttrSlice attrs(*node_def);
735 if (attr_def.has_default_value() && !attrs.Find(attr_def.name())) {
736 AddNodeAttr(attr_def.name(), attr_def.default_value(), node_def);
737 }
738 }
739}
740
741namespace {
742

Callers 12

TryFindKernelClassFunction · 0.85
InitializeNodeDefMethod · 0.85
PreprocessGraphDefFunction · 0.85
BuildGraphMethod · 0.85
ExpectSuccessMethod · 0.85
ExpectInvalidMethod · 0.85
ExpectTypeMismatchMethod · 0.85
ExpectRenameFailureMethod · 0.85
FinalizeMethod · 0.85

Calls 6

attrMethod · 0.80
has_default_valueMethod · 0.80
AddNodeAttrFunction · 0.70
nameMethod · 0.65
FindMethod · 0.45
default_valueMethod · 0.45

Tested by 6

BuildGraphMethod · 0.68
ExpectSuccessMethod · 0.68
ExpectInvalidMethod · 0.68
ExpectTypeMismatchMethod · 0.68
ExpectRenameFailureMethod · 0.68