Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error parsing text-format caffe.NetParameter" in Image-level-HAKE-Action #35

Closed
LSC333 opened this issue Sep 16, 2020 · 6 comments
Closed

Comments

@LSC333
Copy link

LSC333 commented Sep 16, 2020

When I execute python scripts/train.py --pasta-mode linear in docker container, language_model.log is generated. And I checked this file,there are some problems:

I0916 11:37:38.907941   553 caffe.cpp:217] Using GPUs 0
I0916 11:37:38.949647   553 caffe.cpp:222] GPU 0: GeForce GTX 1080 Ti
I0916 11:37:39.380765   553 solver.cpp:51] Initializing solver from parameters: 
test_iter: 2000
test_interval: 1000000
base_lr: 1e-05
display: 20
max_iter: 600000
lr_policy: "cosine"
gamma: 0.1
momentum: 0.9
weight_decay: 0.0005
stepsize: 30000
snapshot: 10000
snapshot_prefix: "snaps/language-model"
device_id: 0
net: "models/Language-Models/train_language-model.prototxt"
train_state {
  level: 0
  stage: ""
}
test_initialization: false
average_loss: 100
iter_size: 16
snapshot_format: HDF5
train_size: 38116
te: 2
multfactor: 2
tt: 2.05884722928
tenext: 2
I0916 11:37:39.381000   553 solver.cpp:94] Creating training net from net file: models/Language-Models/train_language-model.prototxt
[libprotobuf ERROR google/protobuf/text_format.cc:274] Error parsing text-format caffe.NetParameter: 3124:7: Message type "caffe.LayerParameter" has no field named "layer".
F0916 11:37:39.382678   553 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: models/Language-Models/train_language-model.prototxt
*** Check failure stack trace: ***
    @     0x7feae92775cd  google::LogMessage::Fail()
    @     0x7feae9279433  google::LogMessage::SendToLog()
    @     0x7feae927715b  google::LogMessage::Flush()
    @     0x7feae9279e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7feae9b77ac1  caffe::ReadNetParamsFromTextFileOrDie()
    @     0x7feae996e6eb  caffe::Solver<>::InitTrainNet()
    @     0x7feae996f9c7  caffe::Solver<>::Init()
    @     0x7feae996fd6a  caffe::Solver<>::Solver()
    @     0x7feae995a6c3  caffe::Creator_SGDSolver<>()
    @           0x40afb9  train()
    @           0x4077c8  main
    @     0x7feae7a0d830  __libc_start_main
    @           0x408099  _start
    @              (nil)  (unknown)

I googled this problem, it seems to be the reason for the different version of caffe. So I want to ask what is the version of caffe for this project.
My caffe version is:

>>> caffe.__version__
'1.0.0-rc3'
@liangxuy
Copy link
Collaborator

liangxuy commented Sep 16, 2020

Our caffe version is the same as yours. Could you please try Docker to build your environment?

@LSC333
Copy link
Author

LSC333 commented Sep 16, 2020

My environment is built using docker.
The specific command is sudo nvidia-docker run -ti liangxuy/hoi-caffe

@liangxuy
Copy link
Collaborator

The bug is a missing right parenthesis on Line3122 of models/Language-Models/train_language-model.prototxt. We have fixed the bug and update the docker. Thank you for pointing out the problem.

@LSC333
Copy link
Author

LSC333 commented Sep 18, 2020

Thanks for your reply! After using the latest file, I solved the problem!
But there are still some problems here:
IOError: [Errno 2] No such file or directory: './data/hico/hp_list_wts.txt' in language_model.log
IOError: [Errno 2] No such file or directory: './data/hico/hp_list_wts_hico_pvp55.txt' in 10v_attention.log
IOError: [Errno 2] No such file or directory: './data/hico/hp_list_wts.txt' in pasta_linear.log
Could you please tell me how to get these files?

@liangxuy
Copy link
Collaborator

hp_list_wts.txt and hp_list_wts_hico_pvp55.txt are provided under folder ./data/hico in this repo. Please update to the latest version. Thanks.

@LSC333
Copy link
Author

LSC333 commented Sep 20, 2020

I updated to the latest version and it worked!
Thanks for your prompt reply!

@LSC333 LSC333 closed this as completed Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants