PKU-ICST-MIPL / CCL_TMM2018

Source code of our TMM 2018 paper "CCL: Cross-modal Correlation Learning with Multi-grained Fusion by Hierarchical Network"
19 stars 7 forks source link

when runing sh runall.sh:TypeError: Couldn't build proto file into descriptor pool! Invalid proto descriptor for file "deepnet.proto": deepnet.proto: A file with this name is already in the pool. #1

Open Xingxu1996 opened 6 years ago

Xingxu1996 commented 6 years ago

File "../../extract_neural_net_representation.py", line 2, in from neuralnet import File "/home/ubuntu2/yxx2/CCL_TMM2018/deepnet-master/deepnet/neuralnet.py", line 10, in from edge import File "/home/ubuntu2/yxx2/CCL_TMM2018/deepnet-master/deepnet/edge.py", line 2, in from parameter import * File "/home/ubuntu2/yxx2/CCL_TMM2018/deepnet-master/deepnet/parameter.py", line 2, in import deepnet_pb2 File "/home/ubuntu2/yxx2/CCL_TMM2018/deepnet-master/deepnet/deepnet_pb2.py", line 16, in 1(\x02\x12\x1c\n\rcompute_error\x18\x07 \x01(\x08:\x05\x66\x61lse\x12\x0b\n\x03MAP\x18\x08 \x01(\x02\x12\x1a\n\x0b\x63ompute_MAP\x18\t \x01(\x08:\x05\x66\x61lse\x12\x0e\n\x06prec50\x18\n \x01(\x02\x12\x1d\n\x0e\x63ompute_prec50\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x10\n\x08MAP_list\x18\x0c \x03(\x02\x12\x13\n\x0bprec50_list\x18\r \x03(\x02\x12\x10\n\x08sparsity\x18\x0e \x01(\x02\x12\x1f\n\x10\x63ompute_sparsity\x18\x0f \x01(\x08:\x05\x66\x61lse\"\xd0\x02\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x02(\t\x12#\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32\x15.deepnet.Dataset.Data\x12\x16\n\ngpu_memory\x18\x03 \x01(\t:\x02\x32G\x12\x17\n\x0bmain_memory\x18\x04 \x01(\t:\x02\x34G\x12\x1d\n\x0c\x64\x61ta_handler\x18\x05 \x01(\t:\x07\x64\x65\x65pnet\x12\x10\n\x06prefix\x18\x06 \x01(\t:\x00\x1a\xaf\x01\n\x04\x44\x61ta\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x14\n\x0c\x66ile_pattern\x18\x02 \x02(\t\x12\x0c\n\x04size\x18\x03 \x02(\x05\x12\x12\n\ndimensions\x18\x04 \x03(\x05\x12\x15\n\nnum_labels\x18\x05 \x01(\x05:\x01\x31\x12\x0b\n\x03key\x18\x06 \x01(\t\x12\x15\n\x06sparse\x18\x07 \x01(\x08:\x05\x66\x61lse\x12\x12\n\x03seq\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\x12\n\nstats_file\x18\t \x01(\t') File "/home/ubuntu2/anaconda2/lib/python2.7/site-packages/google/protobuf/descriptor.py", line 829, in new return _message.default_pool.AddSerializedFile(serialized_pb) TypeError: Couldn't build proto file into descriptor pool! Invalid proto descriptor for file "deepnet.proto": deepnet.proto: A file with this name is already in the pool.

PKU-ICST-MIPL commented 6 years ago

you can try to reinstall the deepnet package, as well as recompile the proto file under the path "deepnet-master/deepnet/" like "protoc -I=protos/ --python_out=. protos/deepnet.proto"

KB4EVER commented 3 years ago

Is there a good way to debug this code? I try to use pycharm debug. it doesn't work because the parameters need to send by the terminal. Should I use pdb or just simply print? Another Q is while I use my own data, the label information extract from binary file is wrong in caffe, I guess something wrong with the convert_float2leveldb.bin correspond .cpp code. void read_image(std::ifstream* image_file, std::ifstream* label_file, uint32_t index, uint32_t rows, uint32_t cols, float* pixels, char* label_temp, signed char* label, int rgb_use) { if (rgb_use == 0) { image_file->seekg(index * rows * cols * sizeof(float)); image_file->read((char*)pixels, rows * cols * sizeof(float)); label_file->seekg(index); label_file->read(label_temp, 1); for (int i = 0; i < 1; i++) *(label+i) = (signed char)*(label_temp+i);