Adding all project files
This commit is contained in:
parent
6c9e127bdc
commit
cd4316ad0f
42289 changed files with 8009643 additions and 0 deletions
22
venv/Lib/site-packages/torch/utils/backcompat/__init__.py
Normal file
22
venv/Lib/site-packages/torch/utils/backcompat/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# mypy: allow-untyped-defs
|
||||
from torch._C import _set_backcompat_broadcast_warn
|
||||
from torch._C import _get_backcompat_broadcast_warn
|
||||
from torch._C import _set_backcompat_keepdim_warn
|
||||
from torch._C import _get_backcompat_keepdim_warn
|
||||
|
||||
|
||||
class Warning:
|
||||
def __init__(self, setter, getter):
|
||||
self.setter = setter
|
||||
self.getter = getter
|
||||
|
||||
def set_enabled(self, value):
|
||||
self.setter(value)
|
||||
|
||||
def get_enabled(self):
|
||||
return self.getter()
|
||||
|
||||
enabled = property(get_enabled, set_enabled)
|
||||
|
||||
broadcast_warning = Warning(_set_backcompat_broadcast_warn, _get_backcompat_broadcast_warn)
|
||||
keepdim_warning = Warning(_set_backcompat_keepdim_warn, _get_backcompat_keepdim_warn)
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue