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

Substraction matrix ? #49

Closed
extremety1989 opened this issue Dec 12, 2018 · 2 comments
Closed

Substraction matrix ? #49

extremety1989 opened this issue Dec 12, 2018 · 2 comments

Comments

@extremety1989
Copy link

Why is there no Substraction method ?

@waylonflinn
Copy link
Owner

waylonflinn commented Dec 12, 2018

If you're already doing a matrix multiply (adding a bias term, for instance) the easiest way to do this is directly with the sgemm method.

  1. set beta to -1
  2. pass in your bias terms as C (the last argument)

If you aren't doing a multiply beforehand, the best way is with the saxpy method.

  1. set a to -1
  2. pass the matrix you want to subtract from as X
  3. pass the matrix you want to subtract with as Y

Please let me know if this helps you.

@extremety1989
Copy link
Author

extremety1989 commented Dec 12, 2018

well

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

No branches or pull requests

2 participants