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

Function TF_OperationGetAttrTensorList

tensorflow/c/c_api.cc:1489–1499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1487}
1488
1489void TF_OperationGetAttrTensorList(TF_Operation* oper, const char* attr_name,
1490 TF_Tensor** values, int max_values,
1491 TF_Status* status) {
1492 std::vector<Tensor> ts;
1493 status->status = tensorflow::GetNodeAttr(oper->node.attrs(), attr_name, &ts);
1494 if (TF_GetCode(status) != TF_OK) return;
1495 const auto len = std::min(max_values, static_cast<int>(ts.size()));
1496 for (int i = 0; i < len; ++i) {
1497 values[i] = TF_TensorFromTensor(ts[i], status);
1498 }
1499}
1500
1501void TF_OperationGetAttrValueProto(TF_Operation* oper, const char* attr_name,
1502 TF_Buffer* output_attr_value,

Callers 1

TEST_FFunction · 0.85

Calls 6

TF_GetCodeFunction · 0.85
TF_TensorFromTensorFunction · 0.85
GetNodeAttrFunction · 0.50
minFunction · 0.50
attrsMethod · 0.45
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68