Skip to content

Instantly share code, notes, and snippets.

@d3lm
Last active June 6, 2019 19:43
Show Gist options
  • Save d3lm/7798427249f5a3a3daa9f55944fda6f6 to your computer and use it in GitHub Desktop.
Save d3lm/7798427249f5a3a3daa9f55944fda6f6 to your computer and use it in GitHub Desktop.
Matrix Multiplication
class multiply(BinaryOperation):
"""
Computes a * b, element-wise
"""
def forward(self, a, b):
return a * b
def backward(self, upstream_grad):
raise NotImplementedError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment