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

Class Equal

python/singa/autograd.py:963–985  ·  view source on GitHub ↗

Returns the tensor resulted from performing the equal logical operation elementwise on the input tensors x and y.

Source from the content-addressed store, hash-verified

961
962
963class Equal(Operator):
964 """
965 Returns the tensor resulted from performing the equal logical operation
966 elementwise on the input tensors x and y.
967 """
968
969 def __init__(self):
970 super(Equal, self).__init__()
971
972 def forward(self, x, y):
973 """
974 Return `a=b`, where a and b are CTensor.
975 """
976 return singa.__eq__(x, y)
977
978 def backward(self, dy):
979 """
980 Args:
981 dy (CTensor): data for the dL / dy, L is the loss
982 Raises:
983 AssertionError: no backward function for this operator
984 """
985 assert False, ('no backward function for equal')
986
987
988def equal(x, y):

Callers 1

equalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected