reinterpret_cast<const DataType*>(values), num_values));
}
+void TF_SetAttrFunc(TF_OperationDescription* desc, const char* attr_name,
+ const char* value, size_t length) {
+ tensorflow::NameAttrList func_name;
+ func_name.set_name(std::string(value, value + length));
+ desc->node_builder.Attr(attr_name, func_name);
+}
+
void TF_SetAttrShape(TF_OperationDescription* desc, const char* attr_name,
const int64_t* dims, int num_dims) {
PartialTensorShape shape;
const char* attr_name,
const TF_DataType* values,
int num_values);
+// Set a 'func' attribute to the specified name.
+// `value` must point to a string of length `length` bytes.
+TF_CAPI_EXPORT extern void TF_SetAttrFunc(TF_OperationDescription* desc,
+ const char* attr_name,
+ const char* value, size_t length);
// Set `num_dims` to -1 to represent "unknown rank". Otherwise,
// `dims` points to an array of length `num_dims`. `dims[i]` must be