I have a problem with checking the inference time of faster rcnn using nvcaffe_fp16 branch on TX1.
To check the inference time of faster rcnn using nvcaffe_fp16 branch, I already succeeded caffe build using nvcaffe_fp16 branch. And I modified the _caffe.cpp(python/caffe/) as follows:
typedef float16 Dtype;
typedef float16 Mtype;
const int NPY_DTYPE = NPY_FLOAT16;
After this, I did pycaffe build.
Then I tried to check the inference time on python but the error messages occurs as follows:
ImportError: /home/ubuntu/nvcaffe/python/caffe/_caffe.so: undefined symbol: _ZN5caffe6SolverINS_7float16ES1_E5SolveEPKc
For my case, I used TX1 installed jetpack3.0, cuda8.0 and cudnn5.1.
To begin with, I intended to ask the way to check the performance of faster rcnn using nvcaffe fp16 branch not their own caffe branch on TX1.
In my case, I already succeeded to implement faster rcnn using nvcaffe with cudnn5.1 by adding things related to roi_pooling layer and modifying thins related to cudnn5.1 so I obtained the performance of faster rcnn using nvcaffe branch whose type is float. But there is a problem with using nvcaffe float16 not float.
That is, in order to check the inference time of faster rcnn using nvcaffe float16, I modified the _caffe.cpp(python/caffe/) as follows:
(originally the type of Dtype and Mtype is float not float16 in _caffe.cpp)
typedef float16 Dtype;
typedef float16 Mtype;
const int NPY_DTYPE = NPY_FLOAT16;
After this, I did pycaffe build.
Then I tried to check the inference time on python but the error messages occurs as follows:
import caffe
File “/home/ubuntu/nvcaffe/python/caffe/__init__py”, line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File “/home/ubuntu/nvcaffe/python/caffe/pycaffe.py”, line 13. in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver,
ImportError: /home/ubuntu/nvcaffe/python/caffe/_caffe.so: undefined symbol: _ZN5caffe6SolverINS_7float16ES1_E5SolveEPKc
If you have the solution to fix this problem, please help me and let me know.
Sorry for that we can’t reproduce this issue since the branch ‘experimental/fp16’ is not available anymore.
(Branch caffe-0.16 requires cuDNNv6 up which is also not available in current JetPack)
Do you follow this page to build up nvcaffe?
Could you check if this issue only occurs with python wrapper?
→ [Answer] Exactly right. I followed this page to build up nvcaffe.
Could you check if this issue only occurs with python wrapper?
→ [Answer] Yes. as I checked, this issue only occurs with python wrapper using float16. When I used float32 with python wrapper, there is no problem and I obtained the result.
Could you try if can run nvcaffe successfully with c++ interface in float16 mode?
Since the error looks like some missing implementation of flaot16 solver in _caffe.so
Sorry for late response.
As I checked what you asked for me, I successfully run nvcaffe with c++ inferface in float16 mode.
(Originally, I intended to ask you that nvcaffe float 16 mode with python interface since I already succeeded to run nvcaffe float16 mode with c++ interface.)
Now, What can I do to run nvcaffe float16 mode with python mode?
If you have the solution, please help me and let me know.
Thanks for your checking.
Guess that error may cause by some libraries for python interface.
Could you share source of this branch for us debugging? (Sorry since it is not available)