Skip to content
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

Merged
merged 6 commits into from Aug 9, 2019
Merged

SINGA -475 add Sub operator implementation to singa #485

merged 6 commits into from Aug 9, 2019

Conversation

pinpom
Copy link
Contributor

@pinpom pinpom commented Jul 29, 2019

No description provided.

@pinpom pinpom changed the title add Sub operator implementation to singa SINGA -475 add Sub operator implementation to singa Jul 29, 2019
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)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added backward test.


class Sub(Operation):
def __init__(self):
super(Sub, self)._init_()
Copy link
Contributor

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__()  

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the code

@chrishkchris
Copy link
Contributor

Tested on cloud K80 with the code. Ready for merge

@nudles nudles merged commit 5af541f into apache:master Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants