Files
INTUIA/Programa final/_internal/torch/autograd/variable.py
T

16 lines
391 B
Python
Raw Normal View History

2026-03-15 13:27:50 +00:00
# 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()