zplizzi / tensorflow-fast-rcnn

fast-rcnn in tensorflow!
Apache License 2.0
173 stars 42 forks source link

I'm using anaconda and every thing is a mass.. #3

Closed menglin0320 closed 8 years ago

menglin0320 commented 8 years ago

I'm trying to follow the instruction here But I don't know where should I put the build_user_op.sh and call it if I'm using anaconda, I found /home/menglin/anaconda2/envs/tensorflow_env/lib/python2.7/site-packages/tensorflow/include is a pretty good choice and I put your user_ops on /home/menglin/anaconda2/envs/tensorflow_env/lib/python2.7/site-packages/tensorflow/include/ tensorflow/core/ But that doesn't work. And I don't know what to do now

zplizzi commented 8 years ago

I've not used anaconda, but I think it should be the same.

Clone this repository into any folder on your computer, and don't move anything. Simply run the build_user_op.sh file, and it should compile the ops.

Then, you just have to import these compiled files from your code. Take a look at my example here, in the second code block - see how I'm importing the .so files? Do the same thing, but provide the path to wherever on your system the compiled files are located.

menglin0320 commented 8 years ago

NotFoundError Traceback (most recent call last)

in () 5 # Import the forward op 6 roi_pooling_module = tf.load_op_library( ----> 7 home + "/anaconda2/envs/tensorflow_env/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/user_ops/roi_pooling_op.so") 8 roi_pooling_op = roi_pooling_module.roi_pooling 9 /home/menglin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/load_library.pyc in load_op_library(library_filename) 69 return _OP_LIBRARY_MAP[library_filename] 70 # pylint: disable=protected-access ---> 71 raise errors._make_specific_exception(None, None, error_msg, error_code) 72 # pylint: enable=protected-access 73 finally: NotFoundError: libcudart.so.8.0: cannot open shared object file: No such file or directory I got this error
menglin0320 commented 8 years ago

The problem is on the step running these two cammands bazel build -c opt --config=cuda //tensorflow/core/user_ops:roi_pooling_op.so
bazel build -c opt --config=cuda //tensorflow/core/user_ops:roi_pooling_op_grad.so
in build_user_op.sh, I feel I should do it on the root of the tensorflow I'm using instead of do it on the Cloned repository. But I don't know where is the root since the lay out of tensorflow in anaconda is pretty different from normal tensorflow. As I said I found the include folder highly possible to correspond to the root file on the cloned repository, but that doesn't work. I copied the script to the include file and tried to run it. But I got The 'build' command is only supported from within a workspace. The 'build' command is only supported from within a workspace. So I'm very confused now

menglin0320 commented 8 years ago

and my tensorflow version is 0.9 and I found the tensorflow you are using is likely to be 0.8, will that cause any trouble???

menglin0320 commented 8 years ago

It works now, thanks for your help.