joddiy commented on issue #700:
URL: https://github.com/apache/singa/issues/700#issuecomment-645838557


   > Hi,
   > 
   > Exp operator is already implemented in autograd.py
   > 
   > Thanks and Regards,
   > Shashank Nigam
   
   Hi, @Shashankwer , the Type 1 means the operators have been implemented in 
autograd.py, we only need to add it into the sonnx.py.
   
   You can follow my PR to see how to add an operator to sonnx.py and please 
follow by the [ONNX Operator 
Schemas](https://github.com/onnx/onnx/blob/master/docs/Operators.md).
   
   @Shashankwer @Alvinnyk @agnesnatasya 
   There are two points I should explain a little more:
   
   ```
   onnx_node.set_attr_inputs(onnx_node.inputs[1], 'depth')
   onnx_node.set_weight_inputs(onnx_node.inputs[2], 'scale')
   ```
   `set_attr_inputs` means in [ONNX Operator 
Schemas](https://github.com/onnx/onnx/blob/master/docs/Operators.md), they 
regard an element as input, but we regard it as an attribute, so we mark the 
second input `onnx_node.inputs[1]` as attribute `depth` in SINGA.
   
   `set_weight_inputs` means in [ONNX Operator 
Schemas](https://github.com/onnx/onnx/blob/master/docs/Operators.md), they 
regard an element as input and they store its value, but we regard it as a 
weight in `layer.py`. so we mark the third input `onnx_node.inputs[2]` as 
weight `scale` in SINGA.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to