Skip to content

Commit

Permalink
remove debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoXing1996 committed May 18, 2022
1 parent 4e06c48 commit 1a15109
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mmgen/core/runners/fp16_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ def nan_to_num(x, nan=0.0, posinf=None, neginf=None, *, out=None):
Tensor: Output tensor.
"""
try:
print(torch.__version__, 'do not get error')
return torch.nan_to_num(
x, nan=nan, posinf=posinf, neginf=neginf, out=out)
except AttributeError:
print(torch.__version__, 'get error')
if not isinstance(x, torch.Tensor):
raise TypeError(
f'argument input (position 1) must be Tensor, not {type(x)}')
Expand Down

0 comments on commit 1a15109

Please sign in to comment.