Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HW3_CNN_CUDA_ERROR #90

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

huaiyuechusan
Copy link
Contributor

HW3_CNN训练部分交叉熵应该为
criterion = nn.CrossEntropyLoss(ignore_index=-1)
原因:交叉熵计算时,label范围为[0, n_classes-1]

否则会报错
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.

@yyysjz1997 yyysjz1997 merged commit 55ef288 into datawhalechina:master Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants