1.芯片型号:J5
2.天工开物开发包OpenExplorer版本:J5_OE_1.1.74
3.问题定位:自定义算子
4.问题具体描述:
自定义算子的 Forward 函数中,输入和输出都是 NDArray,没有找到类似 hbDNNTensorProperties 的获取方式
attributes 中是否有相关信息?没有看到相关文档说明如何使用
int32_t Init(const Attribute &attributes) override;-
int32_t Forward(const std::vector<NDArray *> &bottomBlobs,-
std::vector<NDArray *> &topBlobs,-
const hbDNNInferCtrlParam *inferCtrlParam) override;
比如想实现一个类似 concat 的自定义算子,两个输入和输出的 scale 有可能不同,需要获取 scale 来做 rescale