yolov5出现result type Float can't be cast to the desired output type __int64
时间: 2023-09-23 13:07:55 浏览: 227
matrix-to-the-desired-string.rar_desired _labview 字模_labview 点阵
出现"result type Float can't be cast to the desired output type __int64"错误通常是因为在PyTorch版本升级后,YOLOv5-6.1的训练代码中出现了数据类型不匹配的问题。具体解决方法可以参考以下引用的建议。
根据引用的建议,可以将Float类型转换为int64类型来解决此问题。具体的修改方法是在代码中找到以下行:
```indices.append((b, a, gj.clamp_(0, gain<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [RuntimeError: result type Float can‘t be cast to the desired output type __int64报错解决方法](https://blog.csdn.net/weixin_54713879/article/details/125612388)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [YOLOv5训练报错:result type Float can‘t be cast to the desired output type __int64](https://blog.csdn.net/bu_fo/article/details/130336910)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文