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

Function eq

python/singa/tensor.py:1218–1229  ·  view source on GitHub ↗

Elementi-wise comparison for t == x. Args: t (Tensor): left hand side operand x (Tensor or float): right hand side operand Returns: a Tensor with each element being t[i] == x ? 1.0f:0.0f, or t[i] == x[i] ? 1.0f:0.0f

(t, x)

Source from the content-addressed store, hash-verified

1216
1217
1218def eq(t, x):
1219 '''Elementi-wise comparison for t == x.
1220
1221 Args:
1222 t (Tensor): left hand side operand
1223 x (Tensor or float): right hand side operand
1224
1225 Returns:
1226 a Tensor with each element being t[i] == x ? 1.0f:0.0f,
1227 or t[i] == x[i] ? 1.0f:0.0f
1228 '''
1229 return t == x
1230
1231
1232def add(lhs, rhs, ret=None):

Callers 1

Cuda>Method · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected