GithubHelp home page GithubHelp logo

Comments (8)

huanghoujing avatar huanghoujing commented on June 22, 2024

你好,请问是用python2, pytorch0.3跑的吗?可以提供一下运行的命令吗?还有提供一下nvidia-smi命令输出的结果?

from alignedreid-re-production-pytorch.

jessicasxl avatar jessicasxl commented on June 22, 2024

你好,我的是Python2.7和pytorch0.3.1
运行指令是:
python script/experiment/train_ml.py
-d '((0,), (1,))'
-r 1
--num_models 2
--dataset market1501
--ids_per_batch 32
--ims_per_id 4
--normalize_feature false
-gm 0.3
-glw 1
-llw 0
-idlw 0
-pmlw 0
-gdmlw 1
-ldmlw 0
--base_lr 2e-4
--lr_decay_type exp
--exp_decay_at_epoch 151
--total_epochs 300

nvidia-smi输出为:
nvidia-smi

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on June 22, 2024

这个命令要求使用两块显卡,可能是这个导致的错误,当访问第1号显卡时会出错,因为不存在。

from alignedreid-re-production-pytorch.

jessicasxl avatar jessicasxl commented on June 22, 2024

嗯嗯,是这个原因,多谢多谢!

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on June 22, 2024

好的,不客气。

from alignedreid-re-production-pytorch.

lufei92 avatar lufei92 commented on June 22, 2024

您好,我在跑您的代码的时候出现runtimeerror问题
Traceback (most recent call last):
File "script/experiment/train_ml.py", line 850, in
main()
File "script/experiment/train_ml.py", line 358, in main
for _ in range(cfg.num_models)]
File "script/experiment/train_ml.py", line 358, in
for _ in range(cfg.num_models)]
File "./aligned_reid/model/Model.py", line 12, in init
self.base = resnet50(pretrained=True)
File "./aligned_reid/model/resnet.py", line 204, in resnet50
model.load_state_dict(remove_fc(rest))
File "./aligned_reid/model/resnet.py", line 161, in remove_fc
for key, value in state_dict.items():
RuntimeError: OrderedDict mutated during iteration
在去除fc层参数这段代码出现问题def remove_fc(state_dict):
"""Remove the fc layer parameters from state_dict."""
#print(state_dict.items())
for key, value in state_dict.items():
if key.startswith('fc.'):
del state_dict[key]
return state_dict
我测试过,数据有读取到,在删除fc层参数这也能执行,但是整体跑下来就是会出现这个错误,请问这个问题怎么解决

from alignedreid-re-production-pytorch.

huanghoujing avatar huanghoujing commented on June 22, 2024

你好,这个错误应该是remove_fc这个函数不兼容Python 3。这个代码用Python 3可能还有其它问题,你试一下用Python 2跑.

from alignedreid-re-production-pytorch.

hsqaihkl avatar hsqaihkl commented on June 22, 2024

@huanghoujing 你好我现在也是在remove_fc这个函数出现问题了,我的是Python3,请问有什么方法修改么?谢谢

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.