Giter VIP home page Giter VIP logo

Comments (4)

HELLORPG avatar HELLORPG commented on May 28, 2024

这个看起来还是个 python 环境导致的问题,首先确定你已经激活了对应的虚拟环境,例如在我机器上是conda activate MeMOTR,之后可以考虑一下用如下代码在命令行中执行验证:

# from the object root
>>> cd ./models/ops/
>>> python
Python 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.13.1' # should output your torch version
>>> torch.cuda.is_available()
True     # must be True

如果不能得到上述的合法输出,或是依旧No module named torch,则考虑是环境安装的问题,可以通过conda list或者pip list查看一下确切的安装列表。


This seems to be a problem caused by the python (virtual) environment. First, make sure you have activated the corresponding environment. For example, we use conda activate MeMOTR if you follow our installation scripts. Then, you can consider using the above code to verify the environment.
If you cannot get the legal output, like still get No module named torch, it may be an environment installation error. You can check the python package list by conda list or pip list.

from memotr.

fish0426 avatar fish0426 commented on May 28, 2024

在成功激活相应的虚拟环境前提下,未使用pip install torch时,使用您提供的代码验证是不能得到合法输出的,我也尝试过在此时使用conda list确实没有名为torch文件,但是在使用了pip install torch后,能够得到合法输出,并且conda list能够找到torch,但是使用sh make.sh仍然出现报错No module named torch

from memotr.

HELLORPG avatar HELLORPG commented on May 28, 2024

听您的描述,我确实也有点不明白这是为什么。
您确定根据 anaconda 的输出 pytorch 已经提示被正确安装?或者可以选择采用 pip 进行安装。此外,您也可以尝试一下直接执行python setup.py以代替sh make.sh

另外,您也可以尝试一下是否可以成功编译 Deformable DETR 中的相同算子。如果仍然不能,可以看看是否可以从他们更完善的 issue 中找到类似的情况。


From your description, I really don't understand why. Are you sure that pytorch has been installed correctly according to the output of anaconda? OR you can choose to install it using pip rather than conda.

Alternatively, you can try to see if you can successfully compile the same DeformableAttn operator in Deformable DETR. Otherwise, see if you can find a similar situation from their issue.

from memotr.

HELLORPG avatar HELLORPG commented on May 28, 2024

由于长时间没有收到您的回复,我将暂时关闭这个 issue。如果后续有需要,您可以随时重新打开这个 issue。


As I haven't received your reply for a long time, I am closing this issue temporarily.
You can re-open this issue as you like~

from memotr.

Related Issues (17)

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.