“nll_loss_forward_reduce_cuda_kernel_2d_index“ not implemented for ‘Float‘
for not index CUDA Kernel 2D reduce float
2023-09-14 09:05:45 时间
Traceback (most recent call last):
File "D:\nlp\zhinengyunwei\wh_lstm_pytorch.py", line 213, in <module>
loss = loss_func(torch.squeeze(output), target)
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\loss.py", line 1150, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py", line 2846, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: "nll_loss_forward_reduce_cuda_kernel_2d_index" not implemented for 'Float'
发生在loss计算的时候,
将
loss_func(torch.squeeze(output), target)
改为:
loss_func(torch.squeeze(output), target.long())
相关文章
- QT-找开工程后,最上方提示the code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.
- 【快捷键】IntelliJ IDEA For Mac 常用快捷键
- fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!
- [Algorithm] Write a Depth First Search Algorithm for Graphs in JavaScript
- [Flow] Declare types for application
- python卸载或者安装时提示There is a problem with this Windows Installer package.A program required for this install to complete could not be run. Contact your support personnel or package vendor
- Android For JNI(三)——C的指针,指针变量,指针常见错误,值传递,引用传递,返回多个值
- [Algorithm] Breadth First JavaScript Search Algorithm for Graphs
- [Python] for.. not in.. Remove Deduplication
- 论文学习:Fully Convolutional Networks for Semantic Segmentation
- 【46】报错Mask is not defined for output layer with width ‘52‘. Define at pipeline build time using:‘ se
- nginx之头部变量x_forwarded_for详解:多级反向代理获取客户端真实IP
- Custom tool error: Failed to generate code for the service reference ××××××. Please check other erro
- just found out why the group by does not work for my app, but work for SCN exercise
- SAP CRM,Cloud for Customer和Fiori应用的direct navigation比较
- The specified executable is not a validapplication for this OS platform.
- some screenshot for SAP Fiori smart template resource load
- SAP Fiori问题排查:Why expand does not work for complex note
- Why expand does not work for complex note
- Not using the local TSLint version found for XXX
- 10.for循环遍历数组
- Android问题笔记 - 在构建提示“Could not resolve all files for configuration ‘:app:debugRuntimeClasspath”
- android的报错提示:java.lang.IllegalStateException: Could not execute method for android:onClick
- 成功解决CatBoost Error: Invalid type for cat_feature[non-default value idx=0,feature_idx=6]=31698.0 : ca
- 【异常】Required request parameter ‘xxx‘ for method parameter type xxxx is not present
- [Maven in action] 解决办法:Could not get the value for parameter encoding for plugin execution...
- Choosing a fast unique identifier (UUID) for Lucene——有时间再看下
- 【文献学习】Meta-Learning to Communicate: Fast End-to-End Training for Fading Channels
- BCGControlBar bcgsoft 31.1 for mfc
- 【知识蒸馏】Channel-wise Knowledge Distillation for Dense Prediction
- 论文阅读:U-Net: Convolutional Networks for Biomedical Image Segmentation
- go语言-控制结构:if for switch那些事
- selenium自动化报Protected Mode settings are not the same for all zones.解决方案