C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:242: block: [0,0,0], thread: [6,0,0] Assertion t >= 0 && t < n_classes failed.
Traceback (most recent call last):
File "run.py", line 37, in
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py",
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line 75, in next
batches = self._to_tensor(batches)
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line 54, in _totensor
x = torch.LongTensor([[0] for _ in datas]).to(self.device)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
每次都是跑到700句的时候出错,想问问大佬们问题出现在哪里
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:242: block: [0,0,0], thread: [6,0,0] Assertion
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py",
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line 75, in next
batches = self._to_tensor(batches)
File "D:\AAWork\PyCharm Community Edition 2021.3.1\AApythonProject\bishe\text1\utils.py", line 54, in _totensor
x = torch.LongTensor([[0] for _ in datas]).to(self.device)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
t >= 0 && t < n_classes
failed. Traceback (most recent call last): File "run.py", line 37, in