2018년 5월 15일 화요일

Switch gcc versions between 4.9 and 5.4 or over

ref: https://codeyarns.com/2015/02/26/how-to-switch-gcc-version-using-update-alternatives/

after setting
$ sudo update-alternatives --config gcc

2018년 5월 1일 화요일

How to use another gpu when the first gpu is out of memory

tip: https://github.com/BVLC/caffe/issues/440
http://kawahara.ca/caffe-how-to-specify-which-gpu-to-use-in-pycaffe/

before initializing gpu, set the gpu_id first
Errors in Caffe

Traceback (most recent call last):
  File "Scripts/compute_bn_statistics.py", line 15, in <module>
    import caffe
  File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: dynamic module does not define init function (init_caffe)

check if you compile your Caffe library using python 2.7 OR python 3.*