if I try to print the loss object with spyder, it will print the following error:
loss
Traceback (most recent call last):
File “C:\Users\hp\anaconda3\lib\site-packages\IPython\core\formatters.py”, line 702, in call
printer.pretty(obj)
File “C:\Users\hp\anaconda3\lib\site-packages\IPython\lib\pretty.py”, line 394, in pretty
return _repr_pprint(obj, self, cycle)
File “C:\Users\hp\anaconda3\lib\site-packages\IPython\lib\pretty.py”, line 700, in _repr_pprint
output = repr(obj)
File “C:\Users\hp\anaconda3\lib\site-packages\torch\tensor.py”, line 193, in repr
return torch._tensor_str._str(self)
File “C:\Users\hp\anaconda3\lib\site-packages\torch_tensor_str.py”, line 383, in _str
return _str_intern(self)
File “C:\Users\hp\anaconda3\lib\site-packages\torch_tensor_str.py”, line 358, in _str_intern
tensor_str = _tensor_str(self, indent)
File “C:\Users\hp\anaconda3\lib\site-packages\torch_tensor_str.py”, line 242, in _tensor_str
formatter = _Formatter(get_summarized_data(self) if summarize else self)
File “C:\Users\hp\anaconda3\lib\site-packages\torch_tensor_str.py”, line 90, in init
nonzero_finite_vals = torch.masked_select(tensor_view, torch.isfinite(tensor_view) & tensor_view.ne(0))
RuntimeError: CUDA error: an illegal memory access was encountered