1

我编写了一个 Python 层,将底部放入数组 ( im),压缩维度并打印数组 ( ) 的形状im_shapecaffe正在引发以下错误,即使再次重新编译后,我也会收到此错误。有人可以帮助我为什么显示此错误吗?我

1222 01:37:59.268040  3566 layer_factory.hpp:77] Creating layer print_shape
Traceback (most recent call last):
  File "/home/user/caffe/python/print_layer.py", line 1, in <module>
    import caffe
  File "/home/user/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
  File "/home/user/caffe/python/caffe/pycaffe.py", line 11, in <module>
    import numpy as np
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/core/__init__.py", line 74, in <module>
    from numpy.testing.nosetester import _numpy_tester
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/site-packages/numpy/testing/__init__.py", line 10, in <module>
    from unittest import TestCase
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/unittest/__init__.py", line 64, in <module>
    from .main import TestProgram, main
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/unittest/main.py", line 7, in <module>
    from . import loader, runner
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/unittest/runner.py", line 7, in <module>
    from .signals import registerResult
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/unittest/signals.py", line 2, in <module>
    import weakref
  File "/home/user/anaconda2/envs/testcaffe/lib/python2.7/weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref 
4

0 回答 0