GithubHelp home page GithubHelp logo

Comments (9)

danieljf24 avatar danieljf24 commented on August 23, 2024

这个在哪个文件第几号报错?另外,你是否改动过测试代码tester.py?

from dual_encoding.

liufangcen avatar liufangcen commented on August 23, 2024

我没有改动过tester.py
具体错误如下
Traceback (most recent call last):
File "/data/projects/untitled/tester.py", line 136, in
main()
File "/data/projects/untitled/tester.py", line 110, in main
torch.save({'errors': c2i_all_errors, 'videos': video_ids, 'captions': caption_ids}, pred_error_matrix_file)
File "/data/anaconda3/envs/pytorch/lib/python2.7/site-packages/torch/serialization.py", line 161, in save
return _with_file_like(f, "wb", lambda f: _save(obj, f, pickle_module, pickle_protocol))
File "/data/anaconda3/envs/pytorch/lib/python2.7/site-packages/torch/serialization.py", line 116, in _with_file_like
f = open(f, mode)
IOError: [Errno 20] Not a directory: '/home/VisualSearch/testCollection/runs/model_best.pth.tar/pred_errors_matrix.pth.tar'

from dual_encoding.

danieljf24 avatar danieljf24 commented on August 23, 2024

保存相似度矩阵的时候报了错,你可以注释掉line 110,这不影响测试。
你看看是否存在/home/VisualSearch/testCollection/runs/model_best.pth.tar这个文件夹,如果存在请列出下面的文件。另外,你的testCollection是不是弄错了?应该是marvvt10ktest

from dual_encoding.

liufangcen avatar liufangcen commented on August 23, 2024

非常感谢!我注释掉110行之后就运行成功了。
但是我无法提取model_best.pth.tar文件下的文件。显示压缩文件格式错误。
请问这个压缩文件有什么特殊的提取方法吗?

from dual_encoding.

danieljf24 avatar danieljf24 commented on August 23, 2024

train目录下的model_best.pth.tar是pytorch保存模型文件,test目录下的model_best.pth.tar是文件夹而不是文件。我感觉你哪里改了代码,测试的时候理论上会自动生成/home/VisualSearch/testCollection/runs/model_best.pth.tar这个文件夹,然后把相识度矩阵保存在该文件夹下

from dual_encoding.

liufangcen avatar liufangcen commented on August 23, 2024

我运行tester的时候无法自动生成model_best.pth.tar是文件夹。
最开始运行时,他会显示错误:
[28 Apr 16:21:50 - tester.py:line 55] runs/model_best.pth.tar not exists.
于是我就把train目录下的model_best.pth.tar是pytorch保存模型文件复制到/home/VisualSearch/testCollection/runs下

再次运行,还是会显示:
[28 Apr 16:21:50 - tester.py:line 55] runs/model_best.pth.tar not exists.

此时,我就将52行的路径为resume = os.path.join(opt.logger_name, opt.checkpoint_name)
改为了
resume = os.path.join(ROOT_PATH,testCollection,opt.logger_name, opt.checkpoint_name)
此时就会报110行代码的错误。
我按照刚刚你说的方法,将110行注释掉,就可以运行了。

除此之外并没有修改tester的任何代码。

请问我按照以上方法运行出的tester是否正确?为何我不能自动生成test目录下的model_best.pth.tar是文件夹

from dual_encoding.

danieljf24 avatar danieljf24 commented on August 23, 2024

https://github.com/danieljf24/dual_encoding#expected-performance 按这个你能运行吗?
另外,你不应该去改代码,而是改脚本 --logger_name 指定你model_best.pth.tar在的位置

from dual_encoding.

liufangcen avatar liufangcen commented on August 23, 2024

我们可以加一个联系方式吗?qq?微信?

from dual_encoding.

danieljf24 avatar danieljf24 commented on August 23, 2024

你把你的微信号发我邮箱吧 [email protected]

from dual_encoding.

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.