zengarden / light_head_rcnn

Light-Head R-CNN
833 stars 223 forks source link

light_head_rcnn/lib/lib_kernel/lib_psalign_pooling/psalign_pooling.so: cannot open shared object file: No such file or directory #53

Open hang0522 opened 5 years ago

hang0522 commented 5 years ago

When run the command "python3 train.py -d 0-7" it shows error as following: Traceback (most recent call last): File "train.py", line 12, in import network_desp File "/home/zzz/tf/light_head_rcnn/experiments/lizeming/light_head_rcnn.ori_res101.coco.ps_roialign/network_desp.py", line 30, in from lib_kernel.lib_psalign_pooling import psalign_pooling_op, psalign_pooling_op_grad File "/home/zzz/tf/light_head_rcnn/lib/lib_kernel/lib_psalign_pooling/psalign_pooling_op.py", line 5, in _psalign_pooling_module = tf.load_op_library(filename) File "/home/test/.local/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename) tensorflow.python.framework.errors_impl.NotFoundError: /home/zzz/tf/light_head_rcnn/lib/lib_kernel/lib_psalign_pooling/psalign_pooling.so: cannot open shared object file: No such file or directory

  1. I have compiled lib folder successfully
  2. I checked the folder "light_head_rcnn/lib/lib_kernel/lib_psalign_pooling/", and there is no file named "psaligh_pooling.so". I am confusing that is there anything wrong when I compiled the lib
aggpankaj2 commented 5 years ago

@hang0522 "python3 train.py -d 0-7" 0-7 show your gpu id so if u are using one gpu you need to specify it by only 0 "python3 train.py -d 0"

nithishc829 commented 5 years ago

I am having issue when loading the session from .meta file `

Traceback (most recent call last): File "freeze_graph.py", line 66, in freeze_graph(args.model_dir, args.output_node_names) File "freeze_graph.py", line 41, in freeze_graph saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=clear_devices) File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1435, in import_meta_graph meta_graph_or_file, clear_devices, import_scope, kwargs)[0] File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1457, in _import_meta_graph_with_return_elements kwargs)) File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 806, in import_scoped_meta_graph_with_return_elements return_elements=return_elements) File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 399, in import_graph_def _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def) File "/home/nithish/my_install/miniconda3/envs/RFCN_tf/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 159, in _RemoveDefaultAttrs op_def = op_dict[node.op] KeyError: 'PSROIPool' `

Since PSROIPool is implemented in .so as a layer is it possible to freeze_graph ?

ccyydejqy commented 3 years ago

vi mvpose/backend/light_head_rcnn/lib/lib_kernel/lib_psalign_pooling/make.sh

TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') TF_LIB=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') CUDA_PATH=/usr/local/cuda-9.0/ # jing nvcc -std=c++11 -c -o psroi_pooling_op.cu.o psroi_pooling_op_gpu.cu.cc \ -I /usr/local \ # jing -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_52 -I$TF_INC/external/nsync/public --expt-relaxed-constexpr

g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=0 -o psroi_pooling.so psroi_pooling_op.cc \ psroi_pooling_op.cu.o -I $TF_INC -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -I$TF_INC/external/nsync/public