2

我正在尝试使用一个非常酷的机器学习 Colab。 https://colab.research.google.com/drive/1eQLZrNYRZMo9zdnGGccE0hFswGiinO-Z?usp=sharing按原样运行他们的步骤,我不断得到ERROR: Failed building wheel for pytorch3d.

经过大量谷歌搜索后,我尝试将安装行替换为

!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'

并且

!pip install pytorch3d

前者不起作用。后者引发了另一个问题:

"ImportError: /usr/local/lib/python3.6/dist-packages/pytorch3d/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7is_cudaEv"

我也尝试过这样!pip install torch==1.6.0

Traceback (most recent call last):
  File "./meshrcnn/demo/demo.py", line 11, in <module>
    from detectron2.data import MetadataCatalog
  File "/usr/local/lib/python3.6/dist-packages/detectron2/data/__init__.py", line 4, in <module>
    from .build import (
  File "/usr/local/lib/python3.6/dist-packages/detectron2/data/build.py", line 14, in <module>
    from detectron2.structures import BoxMode
  File "/usr/local/lib/python3.6/dist-packages/detectron2/structures/__init__.py", line 6, in <module>
    from .keypoints import Keypoints, heatmaps_to_keypoints
  File "/usr/local/lib/python3.6/dist-packages/detectron2/structures/keypoints.py", line 6, in <module>
    from detectron2.layers import interpolate
  File "/usr/local/lib/python3.6/dist-packages/detectron2/layers/__init__.py", line 3, in <module>
    from .deform_conv import DeformConv, ModulatedDeformConv
  File "/usr/local/lib/python3.6/dist-packages/detectron2/layers/deform_conv.py", line 10, in <module>
    from detectron2 import _C
ImportError: /usr/local/lib/python3.6/dist-packages/detectron2/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceISt7complexIdEEEPKNS_6detail12TypeMetaDataEv

!pip install mmcv-full===1.2.1 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html尝试修复该问题,但错误仍然存​​在。

有人对如何使 Colab 环境工作有想法吗?

4

1 回答 1

0

我得到了同样的错误并找到了你的帖子。我试图安装当前的主人(有:

!pip install 'git+https://github.com/facebookresearch/pytorch3d.git'

下载并编译 pytorch3D==0.4.0 后,它实际上工作正常。我认为解决问题的是下载和编译 pytorch3d,以便它与 cuda 正确链接:如果它下载预编译的轮子,您可能会收到未定义的符号错误。

我所做的唯一其他更改:我必须从边界矩形计算单元格中demo=True的调用group_keypoints()中删除 a (它说参数未知)

于 2021-04-21T10:32:05.637 回答