-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Operators #738
Adding Operators #738
Conversation
Added the Floor operator in autograd.py test_operation.py and sonnx.py Added Abs in sonnx.py
@Shashankwer Hi, thanks for your contribution. Have you tried to run the |
Hi @joddiy, Can you help me knowing the process for setting the current dev environment as the singa package. I am using MAC with singa environment 3.0.0.rc1 py37cpu. While running test_operation.py following error is reported AttributeError: module 'singa.singa_wrap' has no attribute 'Floor' The dev consist an implementation of Floor in 'tensor_math.cpp' Thanks and Regards, |
Corrected the superclass to Operation
How about using this cpu docker environment |
Thanks will try |
Made changes in autograd.py after making changes in test_operation
In docker I am able to view the changes work on dev branch. test_operation.py did not result in any errors resulting in floor which was implemented Attached is the screen shot of the same However test_onnx_backend.py resulted in Thanks and Regards, |
Please skip this error 'Gemm.w', the reason is someone modified the method by which we get the parameter, and I've fixed this error in another PR, https://github.com/apache/singa/pull/734/files#diff-c0a014dc6b3a07acd5e7c10001de82c9R2523-R2524 And for the Segmentation fault, I guess it is because the environment, I'm checking this with Chris. |
FYI, the bug fix of seg fault is merged |
Thanks, Will test the code again and update accordingly |
Hi @chrishkchris, @joddiy Test_operation.py gives the following results
Test_onnx_backend.py results in following error:
Kindly let me know if any environment changes needs to ne made. Thanks and Regards, |
maybe you can try add the following two lines and rebuild docker:
FYI, "s" means skip, which skip the GPU test in CPU version |
Hi @chrishkchris , The environment contains onnx version 1.7.0(installed later through pip) and it is in dev branch Thanks and Regards, |
we locked both conda and docker version of onnx 1.6.0. Please try onnx 1.6.0 |
Hi, The test_onnx_backend.py did not gave any error for Floor or Abs added. However following error with maxpool2d was generated
Thanks and Regards, |
Hi, @Shashankwer , thanks. These errors mostly take place because of float precision. You can just ignore these. |
Hi, Floor and Abs then pass the test of both test_operator.py and test_onnx_backend.py Thanks and Regards, |
Thanks @Shashankwer , I hope you have been familiar with the code during you're testing these operators. I guess you can work on more complicated operators now. @nudles This PR is ready to merge. |
Hi @joddiy, Working on further changes, Exp, and round will push the changes shortly. Also working on rest of the operators mentioned in the Issue Thanks, |
please check the comment here, #700 (comment) The Exp and round have been implemented already, you can try this one.
I've checked the manual, it isn't too complicated. You can follow this: https://github.com/onnx/onnx/blob/master/docs/Operators.md#ScatterElements |
Thanks working in ScatterElements |
Added the Floor operator in autograd.py,test_operation.py and sonnx.py
Added Abs in sonnx.py