美文网首页
MacOS 编译 PyTorch 的 Cpp 项目

MacOS 编译 PyTorch 的 Cpp 项目

作者: SpikeKing | 来源:发表于2019-04-26 19:36 被阅读0次
Compile

MacOS 运行 CornerNet-Lite 项目。


cpools

编译cpools库:

cd <CornerNet-Lite dir>/core/models/py_utils/_cpools/
python setup.py install --user

Bug:

torch/lib/include/c10/Device.h:109:8: error:
      redefinition of 'hash'

torch/lib/include/c10/util/UniqueVoidPtr.h:108:54: error:
      no type named 'nullptr_t' in namespace 'std'

明显是Cpp异常,解决方案,参考

export MACOSX_DEPLOYMENT_TARGET=10.11

即可。


nms

编译nms文件:

cd <CornerNet-Lite dir>/core/external
make

Bug:

bbox.pyx:1:0: 'CornerNet-Lite.core.external.bbox' is not a valid module name

明显是模块异常,解决方案,参考

according to this, I delete __ init__.py then it's installed successfully.

即删除 __ init__.py 文件。


OK,that's all!

相关文章

网友评论

      本文标题:MacOS 编译 PyTorch 的 Cpp 项目

      本文链接:https://www.haomeiwen.com/subject/ecaqnqtx.html