Update _utils.py
This commit is contained in:
parent
2c38d3d9ea
commit
7fef1a99b1
1 changed files with 1 additions and 5 deletions
|
|
@ -1187,11 +1187,7 @@ pass
|
|||
EMPTY_LOGITS = EmptyLogits()
|
||||
functions = dir(torch.Tensor)
|
||||
for j, function in enumerate(functions):
|
||||
# if function.endswith("_") and len(function) > 2 and function[-2] != "_":
|
||||
# print()
|
||||
# try: exec(f"EMPTY_LOGITS.{function} = warn_logits_error", globals(), locals())
|
||||
# except: continue
|
||||
# else:
|
||||
if function == "to": continue
|
||||
exec(f"def raise_{j}(*args, **kwargs): print('{function}')", globals(), locals())
|
||||
try: exec(f"EMPTY_LOGITS.{function} = raise_{j}", globals(), locals())
|
||||
except: continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue