From dev-return-5890-archive-asf-public=cust-asf.ponee.io@singa.apache.org Mon Jun 22 10:08:41 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 641E318057A for ; Mon, 22 Jun 2020 12:08:41 +0200 (CEST) Received: (qmail 48812 invoked by uid 500); 22 Jun 2020 10:08:40 -0000 Mailing-List: contact dev-help@singa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.apache.org Delivered-To: mailing list dev@singa.apache.org Received: (qmail 48798 invoked by uid 99); 22 Jun 2020 10:08:40 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2020 10:08:40 +0000 From: =?utf-8?q?GitBox?= To: dev@singa.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bsinga=5D_joddiy_edited_a_comment_on_issue_=23700?= =?utf-8?q?=3A_Expand_the_model_zoo_=28example_model_set=29?= Message-ID: <159282052063.8807.16832194593630712526.asfpy@gitbox.apache.org> Date: Mon, 22 Jun 2020 10:08:40 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: 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 Exp 1h Round 6h Pad 6h Expand 6h Upsample 6h ## Type 3 SpaceToDepth 12h ScatterElements 12h RoiAlign 12h NonMaxSuppression 12h Resize 12h ## Type 4 TopK c++ ReduceMin c++ ReduceMax 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