deeplab-v2 安裝問題總結

交流QQ:1187053210

deeplabv2安裝問題總結如下:

1. cudnn從v5降級到v4,版本5在我的系統出現bug

2. atomicAdd的重寫問題,cuda8已經有了atomicAdd函數的定義,出現bug。

解決方法:https://github.com/vlfeat/matconvnet/issues/575

具體做法:修改common.cuh



#ifndef CAFFE_COMMON_CUH_
#define CAFFE_COMMON_CUH_


#include <cuda.h>
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 600
#else
// CUDA: atomicAdd is not defined for doubles
static __inline__ __device__ double atomicAdd(double *address, double val) {
  unsigned long long int* address_as_ull = (unsigned long long int*)address;
  unsigned long long int old = *address_as_ull, assumed;
  if (val==0.0)
    return __longlong_as_double(old);
  do {
    assumed = old;
    old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val +__longlong_as_double(assumed)));
  } while (assumed != old);
  return __longlong_as_double(old);
}
#endif
#endif



3. matio.h no such file or directory

安裝 libmatio: sudo apt-get install libmatio-dev  

4. 找不到Mat系列bug:

../lib/libcaffe.so.1.0.0-rc3: undefined reference to Mat_VarCreate' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toMat_CreateVer'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to Mat_VarWrite' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toMat_VarFree'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to Mat_VarReadInfo' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toMat_Close'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to Mat_VarReadDataLinear' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toMat_Open'

解決方法:https://github.com/TheLegendAli/DeepLab-Context2/issues/1

具體做法:添加以下代碼至cmake/Dependencies.cmake文件中

find_package(MATIO REQUIRED)
include_directories(${MATIO_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${MATIO_LIBRARIES})
並拷貝該findMatio文件到cmake/Modules/文件夾中

文件下載路徑:https://github.com/TheLegendAli/DeepLab-Context/files/453735/FindMATIO.cmake.zip

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章