GithubHelp home page GithubHelp logo

Comments (15)

fighting-liu avatar fighting-liu commented on July 20, 2024 2

看看pytorch 版本是不是和要求的一样,不同pytorch版本可能参数名不一样

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024 1

@ChunfeiMa After upgrading to pytorch 0.3 or higher, this problem would be solved.

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

有一个文件指定了哪些图片是训练集,哪些是测试集,这个是由new train/test protocol的划分决定的。运行脚本时,这个文件由参数--train_test_partition_file设定。在你上面的错误中,指定到了~/Dataset/cuhk03/re_ranking_train_test_split.pkl,你必须把这个文件(可以从这里下载)放到这个位置才行。

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

谢谢,已解决,还有一个问题出现了
当我运行
python script/tri_loss/train.py -d '(0,)' --dataset market1501 --normalize_feature false -glw 1 -llw 0 -idlw 0 --only_test true --exp_dir SPECIFY_AN_EXPERIMENT_DIRECTORY_HERE --model_weight_file THE_DOWNLOADED_MODEL_WEIGHT_FILE
之后,报了这个错误,请问我需要改动哪个地方?
Traceback (most recent call last):
File "script/tri_loss/train.py", line 404, in
main()
File "script/tri_loss/train.py", line 134, in main
TMO(modules_optims)
File "build/bdist.linux-x86_64/egg/aligned_reid/utils/utils.py", line 154, in call
File "build/bdist.linux-x86_64/egg/aligned_reid/utils/utils.py", line 131, in may_transfer_modules_optims
TypeError: cuda() got an unexpected keyword argument 'device_id'

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

是的,这是pytorch版本的问题,这个工程用的是pytorch 0.1.12。

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

已解决,谢谢

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

又恬不知耻地来问问题了
Traceback (most recent call last):
File "script/tri_loss/train.py", line 404, in
main()
File "script/tri_loss/train.py", line 108, in main
model_w = DataParallel(model)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/parallel/data_parallel.py", line 48, in init
output_device = device_ids[0]
IndexError: list index out of range

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

你是不是没有用显卡,那得把train.py第108行model_w = DataParallel(model)改为model_w = model。因为DataParallel只能在有显卡的情况下才能调用。这里是我考虑不周的一个地方。

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

在docker中运行,不知有没有其他的解决办法,电脑是有nvidia 1080Ti显卡的

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

首先检查一下你这个环境可不可以调用CUDA,试一下这个例子

import torch

x = torch.ones(3, 4).cuda()
print(x)

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

不行,在docker里无法调用CUDA

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

这样,那得先调通这一步。docker我没用过,不了解。。。

from alignedreid-re-production-pytorch.

Tz-george avatar Tz-george commented on July 20, 2024

再次感谢您对我的帮助,我在实体机上已能正常运行,十分感谢

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on July 20, 2024

不客气 : )

from alignedreid-re-production-pytorch.

ChunfeiMa avatar ChunfeiMa commented on July 20, 2024

@Tz-MacWang
how could you solve the problem of "TypeError: cuda() got an unexpected keyword argument 'device_id'"?

from alignedreid-re-production-pytorch.

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.