1、以TSNproject为基础
TSN project上需要修改三个地方:
- 替换temporal-segment-networks/lib/caffe-action/目录下的Makefile.config
- 修改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
- 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));