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