jamtur01's picture
Upload folder using huggingface_hub
9c6594c verified
raw
history blame contribute delete
391 Bytes
# mypy: allow-untyped-defs
import torch
from torch._C import _ImperativeEngine as ImperativeEngine
__all__ = ["VariableMeta", "Variable"]
class VariableMeta(type):
def __instancecheck__(cls, other):
return isinstance(other, torch.Tensor)
class Variable(torch._C._LegacyVariableBase, metaclass=VariableMeta): # type: ignore[misc]
_execution_engine = ImperativeEngine()