name_convention.md 639 字节
Newer Older
D
dongzhihong 已提交
1 2 3 4 5 6
## Operator Name Convention

To make the operator document itself more clear. we recommend operator names observe the listing conventions.

### Input/Output names

D
dongzhihong 已提交
7
* Variable name is prefer uppercase. e.g. `X`, `Y`. But when the variable is tensor, its name should lowercase. e.g. `matrix`, to discriminate with otherone.
D
dongzhihong 已提交
8

D
dongzhihong 已提交
9
* element wise operator, math operator or similar op, please obey common name convention. if the operator only have one output, use `Out`.
D
dongzhihong 已提交
10

D
dongzhihong 已提交
11 12 13 14 15
* we prefer more meaningful input/output name. 

### Best Practice
e.g. `rowwise_add`, inputs : `X`, `Y`, outputs : `Out`
e.g. `cosine` , inputs : `X`, `axis`, outputs : `Out`