| 422 | } |
| 423 | |
| 424 | bool GetAttrValue(TF_Operation* oper, const char* attr_name, |
| 425 | tensorflow::AttrValue* attr_value, TF_Status* s) { |
| 426 | TF_Buffer* buffer = TF_NewBuffer(); |
| 427 | TF_OperationGetAttrValueProto(oper, attr_name, buffer, s); |
| 428 | bool ret = TF_GetCode(s) == TF_OK; |
| 429 | if (ret) ret = attr_value->ParseFromArray(buffer->data, buffer->length); |
| 430 | TF_DeleteBuffer(buffer); |
| 431 | return ret; |
| 432 | } |
| 433 | |
| 434 | std::vector<std::pair<string, string>> GetGradDefs( |
| 435 | const tensorflow::GraphDef& graph_def) { |
no test coverage detected