onehot编码。
struct OnehotParam { int64_t axis = 0; int64_t depth = 0; };
成员名称 |
描述 |
---|---|
axis |
depth所在下标。可为负数。 |
depth |
类别数。 |
参数 |
维度 |
数据类型 |
格式 |
描述 |
---|---|---|---|---|
input |
[-1,…,-1] |
int32/int64 |
ND |
原tensor,维度数不超过7。 |
one |
[1] |
int32/int64 |
ND |
标量0。 |
zero |
[1] |
int32/int64 |
ND |
标量1。 |
参数 |
维度 |
数据类型 |
格式 |
描述 |
---|---|---|---|---|
output |
[-1,…,-1] |
int32/int64 |
ND |
输出tensor,维度数为input的维度数+1。 |