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

Method SingleInput

tensorflow/core/framework/node_def_builder.cc:115–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void NodeDefBuilder::SingleInput(const OpDef::ArgDef* input_arg,
116 StringPiece src_node, int src_index,
117 DataType dt) {
118 AddInput(src_node, src_index);
119
120 if (!input_arg->number_attr().empty() ||
121 !input_arg->type_list_attr().empty()) {
122 errors_.push_back(strings::StrCat("Single tensor passed to '",
123 input_arg->name(), "', expected list"));
124 return;
125 }
126
127 if (input_arg->type() != DT_INVALID) {
128 const DataType expected = MaybeAddRef(input_arg, input_arg->type());
129 VerifyInputType(input_arg, expected, dt);
130 } else {
131 VerifyInputRef(input_arg, dt);
132 Attr(input_arg->type_attr(), BaseType(dt));
133 }
134}
135
136void NodeDefBuilder::ListInput(const OpDef::ArgDef* input_arg,
137 gtl::ArraySlice<NodeOut> src_list) {

Callers

nothing calls this directly

Calls 8

AttrFunction · 0.85
BaseTypeFunction · 0.85
nameMethod · 0.65
typeMethod · 0.65
AddInputFunction · 0.50
StrCatFunction · 0.50
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected