| 1487 | } |
| 1488 | |
| 1489 | void 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 | |
| 1501 | void TF_OperationGetAttrValueProto(TF_Operation* oper, const char* attr_name, |
| 1502 | TF_Buffer* output_attr_value, |