blob: 1008d741a6cf839f7e0ffbf3a5a1ea7b61db2fb1 [file] [log] [blame]
import torch
from torch._six import with_metaclass
class VariableMeta(type):
def __instancecheck__(cls, other):
return isinstance(other, torch.Tensor)
class Variable(with_metaclass(VariableMeta, torch._C._LegacyVariableBase)):
pass
from torch._C import _ImperativeEngine as ImperativeEngine
Variable._execution_engine = ImperativeEngine()