Download torch/autograd/variable.py from UMMJ/JSX_TTS: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/UMMJ/JSX_TTS/resolve/main/torch/autograd/variable.py
- Command line
-
hf download hf://UMMJ/JSX_TTS/torch/autograd/variable.py
-
curl -L -o variable.py https://huggingface.co/UMMJ/JSX_TTS/resolve/main/torch/autograd/variable.py
433 Bytes
| import torch | |
| from torch._six import with_metaclass | |
| class VariableMeta(type): | |
| def __instancecheck__(cls, other): | |
| return isinstance(other, torch.Tensor) | |
| # mypy doesn't understand torch._six.with_metaclass | |
| class Variable(with_metaclass(VariableMeta, torch._C._LegacyVariableBase)): # type: ignore[misc] | |
| pass | |
| from torch._C import _ImperativeEngine as ImperativeEngine | |
| Variable._execution_engine = ImperativeEngine() | |