| 113 | } |
| 114 | |
| 115 | void 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 | |
| 136 | void NodeDefBuilder::ListInput(const OpDef::ArgDef* input_arg, |
| 137 | gtl::ArraySlice<NodeOut> src_list) { |