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

Function TF_OperationOutputListLength

tensorflow/c/c_api.cc:1099–1111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1097}
1098
1099int TF_OperationOutputListLength(TF_Operation* oper, const char* arg_name,
1100 TF_Status* status) {
1101 NameRangeMap name_ranges;
1102 status->status =
1103 NameRangesForNode(oper->node, oper->node.op_def(), nullptr, &name_ranges);
1104 if (TF_GetCode(status) != TF_OK) return -1;
1105 auto iter = name_ranges.find(arg_name);
1106 if (iter == name_ranges.end()) {
1107 status->status = InvalidArgument("Output arg '", arg_name, "' not found");
1108 return -1;
1109 }
1110 return iter->second.second - iter->second.first;
1111}
1112
1113int TF_OperationNumInputs(TF_Operation* oper) {
1114 return oper->node.num_inputs();

Callers 3

TESTFunction · 0.85
TEST_FFunction · 0.85

Calls 6

NameRangesForNodeFunction · 0.85
TF_GetCodeFunction · 0.85
InvalidArgumentFunction · 0.85
op_defMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 2

TESTFunction · 0.68
TEST_FFunction · 0.68