Comments (8)
@shuifuture can you please provide a command to reproduce? Thanks!
from ultralytics.
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
For additional resources and information, please see the links below:
- Docs: https://docs.ultralytics.com
- HUB: https://hub.ultralytics.com
- Community: https://community.ultralytics.com
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
from ultralytics.
先搜索后询问
问题
TypeError:torch._VariableFunctionsClass.meshgrid() 为关键字参数“indexing”获取了多个值
附加
TypeError:torch._VariableFunctionsClass.meshgrid() 为关键字参数“indexing”获取了多个值
我也出现了同样的问题
from ultralytics.
@Xu-Nan 你好!看起来您可能遇到了一个和 meshgrid
函数相关的错误,它涉及到了关键字参数 indexing
。一般来说,这个问题可能是由于 Python 或 PyTorch 版本的不兼容而引起的。
为了能更好地帮助您解决问题,我需要更多的信息。请您提供以下内容:
- 完整的错误消息和堆栈跟踪。
- 导致此错误的具体命令或代码段。
- 您使用的 PyTorch 版本以及任何与问题相关的依赖库的版本。
请确保您的环境中安装了最新版的 PyTorch,并且Yolov8是最新版的。如果可能,更新这些库到最新版本可能会解决您遇到的问题。
此外,建议查看我们的文档,尤其是与安装和设置相关的部分。有时,遵循正确的安装步骤可以预防这类问题。
提供这些信息后,我会尽快帮助您解决遇到的问题!🛠️
from ultralytics.
@Xu-Nan 你好!看起来您可能遇到了一个和 函数相关的错误,它涉及到了关键字参数 。一般来说,这个问题可能是由于 Python 或 PyTorch 版本的不兼容而引起的。
meshgrid``indexing
为了能更好地帮助您解决问题,我需要更多的信息。请您提供以下内容:
- 完整的错误消息和堆栈跟踪。
- 导致此错误的具体命令或代码段。
- 您使用的 PyTorch 版本以及任何与问题相关的依赖库的版本。
请确保您的环境中安装了最新版的 PyTorch,并且Yolov8是最新版的。如果可能,更新这些库到最新版本可能会解决您遇到的问题。
此外,建议查看我们的文档,尤其是与安装和设置相关的部分。有时,遵循正确的安装步骤可以预防这类问题。
提供这些信息后,我会尽快帮助您解决遇到的问题!🛠️
torch版本1.12,python3.7
训练yolo3、4、5、7、X都没问题,就8出现上述问题,删除torch包中functional.py中第478行return _VF.meshgrid(tensors, **kwargs, indexing = ’ij‘) 中的indexing = ’ij‘就不报错了
from ultralytics.
@Xu-Nan 感谢您提供了相关信息。从您描述的情况来看,这可能是因为在 PyTorch 的某个版本中对 torch.meshgrid
函数的行为做了修改,引入了对 indexing
参数的支持。由于 YOLOv8 可能在其实现中使用了这一特性,这可能导致了与旧版本 PyTorch 不兼容的问题。
🛠️ 解决方案:
您提到删除 functional.py
中 meshgrid
调用的 indexing
参数可以解决问题,这确实是一种临时的解决办法,但通常我们不推荐修改库文件,因为这会影响到其他依赖该库的程序的正常运行。
建议的做法是:
- 更新 PyTorch 版本 - 请尝试更新至 PyTorch 的最新版本 (1.13.x 或更高),因为最新的 YOLOv8 可能需要最新版本的 PyTorch。
- 环境兼容性 - 确保您使用的所有库都是最新的,并且它们之间是兼容的。
- 更新 YOLOv8 - 确保您正在使用 YOLOv8 的最新版本。
在尝试上述操作前,确认您已备份您的工作环境。如有可能,请创建新的虚拟环境以避免影响到其他项目。
如果在更新库版本之后仍然遇到问题,请通过Yolov8 issues页提供更新后遇到的详细报错信息,我们会尽快帮您排查问题。我们重视您的反馈,并将致力于改进我们的模型和库以提供更好的用户体验。👍
from ultralytics.
@Xu-Nan 感谢您提供了相关信息。从您描述的情况来看,这可能是因为在 PyTorch 的某个版本中对
torch.meshgrid
函数的行为做了修改,引入了对indexing
参数的支持。由于 YOLOv8 可能在其实现中使用了这一特性,这可能导致了与旧版本 PyTorch 不兼容的问题。🛠️ 解决方案: 您提到删除
functional.py
中meshgrid
调用的indexing
参数可以解决问题,这确实是一种临时的解决办法,但通常我们不推荐修改库文件,因为这会影响到其他依赖该库的程序的正常运行。建议的做法是:
- 更新 PyTorch 版本 - 请尝试更新至 PyTorch 的最新版本 (1.13.x 或更高),因为最新的 YOLOv8 可能需要最新版本的 PyTorch。
- 环境兼容性 - 确保您使用的所有库都是最新的,并且它们之间是兼容的。
- 更新 YOLOv8 - 确保您正在使用 YOLOv8 的最新版本。
在尝试上述操作前,确认您已备份您的工作环境。如有可能,请创建新的虚拟环境以避免影响到其他项目。
如果在更新库版本之后仍然遇到问题,请通过Yolov8 issues页提供更新后遇到的详细报错信息,我们会尽快帮您排查问题。我们重视您的反馈,并将致力于改进我们的模型和库以提供更好的用户体验。👍
谢谢,我将pytorch版本升级到1.13.1之后解决了这个问题。
from ultralytics.
@Xu-Nan 太好了!非常高兴听说您已通过升级 PyTorch 版本解决了问题。如果未来您在使用 YOLOv8 或任何其他 Ultralytics 产品时遇到其他问题或疑问,请随时通过 issue 提交来寻求帮助。感谢您的支持,祝您在使用我们的模型进行项目开发时一切顺利!🌟🚀
from ultralytics.
Related Issues (20)
- Why is YOLOv8_ OBB not very good at square rotating detection? HOT 7
- How can I handle images with a resolution of 3840*2160 directly? HOT 4
- Yolov8 semi-supervised learning HOT 3
- How to stop training from freezing and then Crashing my PySide6 Program? HOT 4
- When I was training with multiple GPUs, I kept getting stuck in ’AMP: checks passed ✅‘ HOT 5
- yoloworld offline use , set_classes adds specified weight path parameters HOT 2
- CalledProcessError while training yolov8 on kaggle HOT 2
- RT-DETR HOT 1
- Yolov8 not working in example ultralytics/examples/YOLOv8-CPP-Inference HOT 2
- Using YOLOv8 for Fish Detection in Underwater Videos HOT 2
- YOLOv8m-pose AttributeError: 'Pose' object has no attribute 'detect' HOT 4
- I just start to learn how to use yolov8. I don'know why the map is so low,and I don'know how to solve the problem.T-T. HOT 2
- training failed when only has 1 training image HOT 1
- can i use yolov8 classification in face recognize task HOT 3
- Different val results when save_hybrid=True HOT 2
- How can i calculate TP,FP,TN and FN to get evaluation metrics for segmentation task ? HOT 3
- [DIRECT-STREAMING!] Lille - Lyon (OL) E.n Direct Streaming Gratuit TV 6. 05. 2024 HOT 2
- How to change confidence threshold in model.train? HOT 6
- YOLOv9 HOT 2
- Car snippet / Speed estimation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.