Count the number of inputs of a given node. If `tf_import_flags.drop_control_dependency` is true, count the number of non-control-dependency inputs.
| 504 | // `tf_import_flags.drop_control_dependency` is true, count the number of |
| 505 | // non-control-dependency inputs. |
| 506 | int GetInputsCount(const NodeDef& node, |
| 507 | const TensorFlowImportFlags& tf_import_flags) { |
| 508 | if (tf_import_flags.drop_control_dependency) { |
| 509 | for (size_t i = 0; i < node.input_size(); ++i) { |
| 510 | if (node.input(i)[0] == '^') { |
| 511 | return i; |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | return node.input_size(); |
| 516 | } |
| 517 | |
| 518 | tensorflow::Status CheckInputsCount( |
| 519 | const NodeDef& node, const TensorFlowImportFlags& tf_import_flags, |
no test coverage detected