caffe环境配置(行为识别)

1、以TSNproject为基础
  TSN project上需要修改三个地方:

  1. 替换temporal-segment-networks/lib/caffe-action/目录下的Makefile.config
  2. 修改temporal-segment-networks/lib/caffe-action/Makefile文件的LIBRARIES和PYTHON_LIBRARIES
LIBRARIES += glog gflags protobuf leveldb snappy \
	lmdb boost_system hdf5_hl hdf5 m \
	opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
PYTHON_LIBRARIES := boost_python python3.6
  1. temporal-segment-networks/lib/caffe-action/src/caffe/layers/contrastive_loss_layer.cpp文件,将56行改为
Dtype dist = std::max(margin - sqrt(dist_sq_.cpu_data()[i]), Dtype(0.0));

猜你喜欢

转载自blog.csdn.net/qq_18644873/article/details/84749239