GithubHelp home page GithubHelp logo

Comments (8)

AyushExel avatar AyushExel commented on May 22, 2024

@shuifuture can you please provide a command to reproduce? Thanks!

from ultralytics.

github-actions avatar github-actions commented on May 22, 2024

👋 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:

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.

Xu-Nan avatar Xu-Nan commented on May 22, 2024

先搜索后询问

问题

TypeError:torch._VariableFunctionsClass.meshgrid() 为关键字参数“indexing”获取了多个值

附加

TypeError:torch._VariableFunctionsClass.meshgrid() 为关键字参数“indexing”获取了多个值

我也出现了同样的问题

from ultralytics.

glenn-jocher avatar glenn-jocher commented on May 22, 2024

@Xu-Nan 你好!看起来您可能遇到了一个和 meshgrid 函数相关的错误,它涉及到了关键字参数 indexing。一般来说,这个问题可能是由于 Python 或 PyTorch 版本的不兼容而引起的。

为了能更好地帮助您解决问题,我需要更多的信息。请您提供以下内容:

  1. 完整的错误消息和堆栈跟踪。
  2. 导致此错误的具体命令或代码段。
  3. 您使用的 PyTorch 版本以及任何与问题相关的依赖库的版本。

请确保您的环境中安装了最新版的 PyTorch,并且Yolov8是最新版的。如果可能,更新这些库到最新版本可能会解决您遇到的问题。

此外,建议查看我们的文档,尤其是与安装和设置相关的部分。有时,遵循正确的安装步骤可以预防这类问题。

提供这些信息后,我会尽快帮助您解决遇到的问题!🛠️

from ultralytics.

Xu-Nan avatar Xu-Nan commented on May 22, 2024

@Xu-Nan 你好!看起来您可能遇到了一个和 函数相关的错误,它涉及到了关键字参数 。一般来说,这个问题可能是由于 Python 或 PyTorch 版本的不兼容而引起的。meshgrid``indexing

为了能更好地帮助您解决问题,我需要更多的信息。请您提供以下内容:

  1. 完整的错误消息和堆栈跟踪。
  2. 导致此错误的具体命令或代码段。
  3. 您使用的 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.

glenn-jocher avatar glenn-jocher commented on May 22, 2024

@Xu-Nan 感谢您提供了相关信息。从您描述的情况来看,这可能是因为在 PyTorch 的某个版本中对 torch.meshgrid 函数的行为做了修改,引入了对 indexing 参数的支持。由于 YOLOv8 可能在其实现中使用了这一特性,这可能导致了与旧版本 PyTorch 不兼容的问题。

🛠️ 解决方案:
您提到删除 functional.pymeshgrid 调用的 indexing 参数可以解决问题,这确实是一种临时的解决办法,但通常我们不推荐修改库文件,因为这会影响到其他依赖该库的程序的正常运行。

建议的做法是:

  1. 更新 PyTorch 版本 - 请尝试更新至 PyTorch 的最新版本 (1.13.x 或更高),因为最新的 YOLOv8 可能需要最新版本的 PyTorch。
  2. 环境兼容性 - 确保您使用的所有库都是最新的,并且它们之间是兼容的。
  3. 更新 YOLOv8 - 确保您正在使用 YOLOv8 的最新版本。

在尝试上述操作前,确认您已备份您的工作环境。如有可能,请创建新的虚拟环境以避免影响到其他项目。

如果在更新库版本之后仍然遇到问题,请通过Yolov8 issues页提供更新后遇到的详细报错信息,我们会尽快帮您排查问题。我们重视您的反馈,并将致力于改进我们的模型和库以提供更好的用户体验。👍

from ultralytics.

Xu-Nan avatar Xu-Nan commented on May 22, 2024

@Xu-Nan 感谢您提供了相关信息。从您描述的情况来看,这可能是因为在 PyTorch 的某个版本中对 torch.meshgrid 函数的行为做了修改,引入了对 indexing 参数的支持。由于 YOLOv8 可能在其实现中使用了这一特性,这可能导致了与旧版本 PyTorch 不兼容的问题。

🛠️ 解决方案: 您提到删除 functional.pymeshgrid 调用的 indexing 参数可以解决问题,这确实是一种临时的解决办法,但通常我们不推荐修改库文件,因为这会影响到其他依赖该库的程序的正常运行。

建议的做法是:

  1. 更新 PyTorch 版本 - 请尝试更新至 PyTorch 的最新版本 (1.13.x 或更高),因为最新的 YOLOv8 可能需要最新版本的 PyTorch。
  2. 环境兼容性 - 确保您使用的所有库都是最新的,并且它们之间是兼容的。
  3. 更新 YOLOv8 - 确保您正在使用 YOLOv8 的最新版本。

在尝试上述操作前,确认您已备份您的工作环境。如有可能,请创建新的虚拟环境以避免影响到其他项目。

如果在更新库版本之后仍然遇到问题,请通过Yolov8 issues页提供更新后遇到的详细报错信息,我们会尽快帮您排查问题。我们重视您的反馈,并将致力于改进我们的模型和库以提供更好的用户体验。👍

谢谢,我将pytorch版本升级到1.13.1之后解决了这个问题。

from ultralytics.

glenn-jocher avatar glenn-jocher commented on May 22, 2024

@Xu-Nan 太好了!非常高兴听说您已通过升级 PyTorch 版本解决了问题。如果未来您在使用 YOLOv8 或任何其他 Ultralytics 产品时遇到其他问题或疑问,请随时通过 issue 提交来寻求帮助。感谢您的支持,祝您在使用我们的模型进行项目开发时一切顺利!🌟🚀

from ultralytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.