【发布时间】:2017-12-14 16:30:24
【问题描述】:
我按照以下说明在 Tensorflow 中添加了自定义运算符: https://www.tensorflow.org/extend/adding_an_op
现在我想将相同的运算符添加到 Tensorflow Lite。 我按照this 说明在 TF Lite 中添加自定义运算符,但它没有说明如何添加具有属性的自定义运算符。 像这样:
REGISTER_OP("CustomOpName")
.Attr("T: {float}")
.Attr("scale_factor: int")
.Input("x: T")
.Output("out: T")
我尝试像内置运算符一样将 TfLiteNode* 节点转换为自定义参数结构,如 TfLiteLocalResponseNormParams,但问题是 TfLiteNode* 节点等于 NULL。
【问题讨论】:
-
你找到解决方案了吗?
-
您提供的说明链接最近更新了。我已成功添加新操作,没有任何问题。
标签: c++ tensorflow tensorflow-lite