mirror of https://github.com/Jittor/Jittor
commit
a83eea318d
|
@ -2010,6 +2010,7 @@ jt.Var.contiguous = contiguous
|
||||||
def cpu(x): return x.clone()
|
def cpu(x): return x.clone()
|
||||||
jt.Var.cpu = cpu
|
jt.Var.cpu = cpu
|
||||||
def to(x, *args, **kargs):
|
def to(x, *args, **kargs):
|
||||||
|
args += tuple(kargs.values())
|
||||||
if len(args) >= 1:
|
if len(args) >= 1:
|
||||||
s = args[0]
|
s = args[0]
|
||||||
if isinstance(s, jt.NanoString) or callable(s):
|
if isinstance(s, jt.NanoString) or callable(s):
|
||||||
|
|
Loading…
Reference in New Issue