MCPcopy Create free account
hub / github.com/apache/singa / forward

Method forward

python/singa/autograd.py:865–874  ·  view source on GitHub ↗

Return `a+b`, where a and b are CTensor.

(self, a, b)

Source from the content-addressed store, hash-verified

863 super(Add, self).__init__()
864
865 def forward(self, a, b):
866 """
867 Return `a+b`, where a and b are CTensor.
868 """
869 res = singa.__add__(a, b)
870 if training:
871 self.shape0 = list(a.shape())
872 self.shape1 = list(b.shape())
873 self.shape3 = list(res.shape())
874 return res
875
876 def backward(self, dy):
877 """

Callers

nothing calls this directly

Calls 2

shapeMethod · 0.80
__add__Method · 0.45

Tested by

no test coverage detected