Return `a+b`, where a and b are CTensor.
(self, a, b)
| 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 | """ |