Ejemplo n.º 1
0
 def __ge__(self, other):
     return Ge()(self, utils.ensure_tensor(other))
Ejemplo n.º 2
0
 def __ne__(self, other):
     return Neg()(self, utils.ensure_tensor(other))
Ejemplo n.º 3
0
 def __lt__(self, other):
     return Lt()(self, utils.ensure_tensor(other))
Ejemplo n.º 4
0
 def __rmul__(self, other):
     return utils.ensure_tensor(other).mul(self)
Ejemplo n.º 5
0
 def __eq__(self, other):
     return Eq()(self, utils.ensure_tensor(other))
Ejemplo n.º 6
0
 def __radd__(self, other):
     return utils.ensure_tensor(other).add(self)
Ejemplo n.º 7
0
 def __rsub__(self, other):
     return utils.ensure_tensor(other).sub(self)
Ejemplo n.º 8
0
 def div(self, other):
     return Div()(self, utils.ensure_tensor(other))
Ejemplo n.º 9
0
 def cat(self, other, dim=0):
     if isinstance(dim, Tensor):
         dim = dim.data
     return Concat()(self, utils.ensure_tensor(other), dim)
Ejemplo n.º 10
0
 def pow(self, other):
     return Pow()(self, utils.ensure_tensor(other))
Ejemplo n.º 11
0
 def mm(self, other):
     return MM()(self, utils.ensure_tensor(other))
Ejemplo n.º 12
0
 def mul(self, other):
     return Mul()(self, utils.ensure_tensor(other))
Ejemplo n.º 13
0
 def sub(self, other):
     return Add()(self, Neg()(utils.ensure_tensor(other)))
Ejemplo n.º 14
0
 def add(self, other):
     return Add()(self, utils.ensure_tensor(other))