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

Function TF_OperationGetAttrTensorShapeProto

tensorflow/c/c_api.cc:1442–1453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1440}
1441
1442void TF_OperationGetAttrTensorShapeProto(TF_Operation* oper,
1443 const char* attr_name,
1444 TF_Buffer* value, TF_Status* status) {
1445 const auto* attr = GetAttrValue(oper, attr_name, status);
1446 if (TF_GetCode(status) != TF_OK) return;
1447 if (attr->value_case() != tensorflow::AttrValue::kShape) {
1448 status->status =
1449 InvalidArgument("Value for '", attr_name, "' is not a shape.");
1450 return;
1451 }
1452 status->status = MessageToBuffer(attr->shape(), value);
1453}
1454
1455void TF_OperationGetAttrTensorShapeProtoList(TF_Operation* oper,
1456 const char* attr_name,

Callers 1

TEST_FFunction · 0.85

Calls 5

GetAttrValueFunction · 0.85
TF_GetCodeFunction · 0.85
InvalidArgumentFunction · 0.85
MessageToBufferFunction · 0.85
shapeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68