I “import caffe” from ipython, but I got “RuntimeWarning”. How to resolve it?

前端 未结 2 1652
轮回少年
轮回少年 2021-01-22 06:22

I have read the article "Ubuntu Installation --Guide for Ubuntu 14.04 with a 64 bit processor." from Github website (https://github.com/tiangolo/caffe/blob/ubuntu-tuto

相关标签:
2条回答
  • 2021-01-22 06:51

    You can edit /caffe/python/caffe/_caffe.cpp . There are four places need to change,like this

    bp::register_ptr_to_python<shared_ptr<Layer<Dtype> > >();
    

    to

    const boost::python::type_info cinfo = boost::python::type_id<shared_ptr<Blob<Dtype> > >();
    const boost::python::converter::registration* creg = boost::python::converter::registry::query(cinfo);
          if (creg == NULL)
          {
             bp::register_ptr_to_python<shared_ptr<Layer<Dtype> > >();
          }
          else if ((*creg).m_to_python == NULL) {
             bp::register_ptr_to_python<shared_ptr<Layer<Dtype> > >();
          }
    

    then compile use 'make pycaffe' ,it will be ok.

    0 讨论(0)
  • 2021-01-22 07:13

    I found this:

    https://groups.google.com/forum/#!topic/caffe-users/C_air48cISU

    Claiming that this is a non-error, cause by mis-matched versions of Boost. You can safely ignore it. They've promised to clean up the warning (at some point not yet specified)

    0 讨论(0)
提交回复
热议问题