singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] joddiy edited a comment on issue #700: Expand the model zoo (example model set)
Date Sat, 20 Jun 2020 19:35:08 GMT

joddiy edited a comment on issue #700:
URL: https://github.com/apache/singa/issues/700#issuecomment-642418693


   Thanks @agnesnatasya , I'll test the InceptionV2 again to check the error.
   
   And thanks you all for your contribution! @Shashankwer @agnesnatasya @Alvinnyk 
   
   For the next plan, I list some necessary operators we have to implement:
   
   ## Type 1
   Abs 1h
   Floor 1h
   
   ## Type 2
   <s>Exp 1h</s>
   <s>Round 6h</s>
   <s>Pad 6h</s>
   <s>Expand 6h</s>
   <s>Upsample 6h</s>
   
   ## Type 3
   SpaceToDepth 12h
   TopK 	12h
   NonMaxSuppression 12h
   Resize 12h
   
   ## Type 4
   ReduceMin c++
   
   Type 1 means the operators have been implemented in autograd.py, we only need to add it
into the sonnx.py.
   Type 2 and Type 3 mean the operators don't exist in autograd.py, we need to implement them
first. Type 2 is easier but Type 3 is harder.
   Type 4 need to modify the c++ code, we'll consider it later.
   Xh means the workload hours.
   
   So the plan is:
   1. You should read the code of soonx.py under [dev branch](https://github.com/apache/singa/tree/dev).
Because we have updated the soonx to support the re-training, so it's a little different from
the old version.
   2. You try to add an operator at the `Type 1`, you may add a key in the SingaBackend._rename_operators,
and if you need a function to modify the operator, add a key in the SingaBackend._special_operators
to indicate such a function.
   3. Try to add the test cases to test your new operator, the test cases list at [here](https://github.com/onnx/onnx/tree/master/onnx/backend/test/data/node),
and you should check the code in test_onnx_backend.py. There are two patterns, the include
pattern means the operators which do not in it will be excluded, and the exclude patterns
will exclude the pattern in it.
   4. When you finish the Type 1, I guess you must have been familiar with the sonnx, so you
can try the Type 2 and Type 3. These need you to add operators in `autograd.py`, you can read
the code in it and add test cases in `test_operation.py`. In the `autograd.py`, you need to
add a class with forward and backward functions. and you need to add a function to call the
class's forward function. Don't forget to add test cases in `test_operation.py`. After you
add the operator in the autograd, you can add it to the sonnx following the point 2 and 3.
   
   I know it's a little difficult at first. So I hope you don't be urgent to do, just read
the code carefully first and if you have any questions, feel free to ask me.
   
   By the way, please add your code to dev branch. And please skip the frontend code in sonnx.py,
only read the backend one. I'm working on the frontend to upgrade it.
   


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message