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
SINGA -475 add Sub operator implementation to singa #485
Conversation
test/python/test_operation.py
Outdated
dx=result.creator.backward(x.data)[0] | ||
|
||
result_np=np.subtract(X,Y) | ||
np.testing.assert_array_almost_equal(tensor.to_numpy(result), result_np) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the test case of backward propagation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added backward test.
python/singa/autograd.py
Outdated
|
||
class Sub(Operation): | ||
def __init__(self): | ||
super(Sub, self)._init_() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line1835: super(Sub, self)._init_()
should be
super(Sub, self).__init__()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the code
Tested on cloud K80 with the code. Ready for merge |
No description provided.