[SOLVED] TK1 Python Caffe Problems

My JetPack version is 3.0

Hello. I downloaded the Caffe from GitHub - RadekSimkanic/caffe-for-cudnn-v2.5.48: Caffe: a fast open framework for deep learning.

Make -j4 all

works fine.

But when I tried to:

make -j4 runtest

Error:

--------] 12 tests from SGDSolverTest/3 (5532 ms total)

[----------] 5 tests from DBTest/1, where TypeParam = caffe::TypeLMDB
[ RUN      ] DBTest/1.TestWrite
F0802 16:50:22.540390  1062 db_lmdb.hpp:14] Check failed: mdb_status == 0 (-30792 vs. 0) MDB_MAP_FULL: Environment mapsize limit reached
*** Check failure stack trace: ***
    @ 0x432ed060  (unknown)
    @ 0x432ecf5c  (unknown)
    @ 0x432ecb78  (unknown)
    @ 0x432eef98  (unknown)
    @ 0x43d96656  caffe::db::LMDBTransaction::Put()
    @   0x2dd1ba  caffe::DBTest_TestWrite_Test<>::TestBody()
    @   0x343484  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @   0x33ca74  testing::Test::Run()
    @   0x33cb06  testing::TestInfo::Run()
    @   0x33cbda  testing::TestCase::Run()
    @   0x33cd88  testing::internal::UnitTestImpl::RunAllTests()
    @   0x34320c  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @   0x33c576  testing::UnitTest::Run()
    @    0xbf76c  main
    @ 0x44250670  (unknown)
make: *** [runtest] Aborted

I tried to download new caffe but I have a problem with compute_arch. Tried everything but didnt solve.

After the runtest error I tried the import caffe. It works but kind of…
Like this:

raceback (most recent call last):
  File "test.py", line 1, in <module>
    import numpy as np
  File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 153, in <module>
    from . import add_newdocs
  File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 22, in <module>
    from .npyio import *
  File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 4, in <module>
    from . import format
  File "/usr/lib/python2.7/dist-packages/numpy/lib/format.py", line 141, in <module>
    import io
  File "/home/ubuntu/python/caffe/io.py", line 2, in <module>
    import skimage.io
  File "/usr/lib/python2.7/dist-packages/skimage/__init__.py", line 166, in <module>
    from .util.dtype import *
  File "/usr/lib/python2.7/dist-packages/skimage/util/__init__.py", line 1, in <module>
    from .dtype import (img_as_float, img_as_int, img_as_uint, img_as_ubyte,
  File "/usr/lib/python2.7/dist-packages/skimage/util/dtype.py", line 8, in <module>
    dtype_range = {np.bool_: (False, True),
AttributeError: 'module' object has no attribute 'bool_'

What i need to?

Hi,

Please following this page to install Caffe:

Thanks.

When I try make -j 4 all

It says:

CXX src/caffe/layers/hdf5_data_layer.cpp
NVCC src/caffe/solvers/rmsprop_solver.cu
nvcc fatal   : Unsupported gpu architecture 'compute_60'
make: *** [.build_release/cuda/src/caffe/solvers/rmsprop_solver.o] Error 1
make: *** Waiting for unfinished jobs....
ubuntu@tegra-ubuntu:~/caffe$

Hi,

TK1 GPU architecture is 32.

Please add 32 architecture here:
https://github.com/RadekSimkanic/caffe-for-cudnn-v2.5.48/blob/master/Makefile.config.example#L27

-gencode arch=compute_32,code=sm_32 \

Thanks.

I wanna use Caffe with Python. So I have to change makefile like this:

Old=
#USE_CUDNN :=1
New=
USE_CUDNN :=1

Old=
#WITH_PYTHON_LAYER :=1
New=
WITH_PYTHON_LAYER :=1

If I dont change the files, there no error with runtest. But i cant use.When I change the file like this and when i try make -j 4 runtest, after 25 min,

--------] 12 tests from SGDSolverTest/3 (5532 ms total)

[----------] 5 tests from DBTest/1, where TypeParam = caffe::TypeLMDB
[ RUN      ] DBTest/1.TestWrite
F0802 16:50:22.540390  1062 db_lmdb.hpp:14] Check failed: mdb_status == 0 (-30792 vs. 0) MDB_MAP_FULL: Environment mapsize limit reached
*** Check failure stack trace: ***
    @ 0x432ed060  (unknown)
    @ 0x432ecf5c  (unknown)
    @ 0x432ecb78  (unknown)
    @ 0x432eef98  (unknown)
    @ 0x43d96656  caffe::db::LMDBTransaction::Put()
    @   0x2dd1ba  caffe::DBTest_TestWrite_Test<>::TestBody()
    @   0x343484  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @   0x33ca74  testing::Test::Run()
    @   0x33cb06  testing::TestInfo::Run()
    @   0x33cbda  testing::TestCase::Run()
    @   0x33cd88  testing::internal::UnitTestImpl::RunAllTests()
    @   0x34320c  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @   0x33c576  testing::UnitTest::Run()
    @    0xbf76c  main
    @ 0x44250670  (unknown)
make: *** [runtest] Aborted

Hi,

Python interface doesn’t need to enable this option:

WITH_PYTHON_LAYER :=1

Just compile Caffe with this command after make.

$ make pycaffe

Thanks.

Okey I solved the import caffe problem with Export Python path. Thank you.