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

Function SetAttr

tensorflow/c/python_api.cc:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void SetAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
30 TF_Buffer* attr_value_proto, TF_Status* status) {
31 AttrValue attr_val;
32 if (!attr_val.ParseFromArray(attr_value_proto->data,
33 attr_value_proto->length)) {
34 status->status =
35 tensorflow::errors::InvalidArgument("Invalid AttrValue proto");
36 return;
37 }
38
39 mutex_lock l(graph->mu);
40 op->node.AddAttr(attr_name, attr_val);
41 RecordMutation(graph, *op, "setting attribute");
42}
43
44void ClearAttr(TF_Graph* graph, TF_Operation* op, const char* attr_name,
45 TF_Status* status) {

Callers

nothing calls this directly

Calls 3

InvalidArgumentFunction · 0.85
RecordMutationFunction · 0.85
AddAttrMethod · 0.80

Tested by

no test coverage detected