ROIPoolingLayer和SmoothL1LossLayer类的声明可以在caffe-fast-rcnn/include/caffe下的fast_rcnn_layers.hpp文件中找到。
ROIPoolingLayer和SmoothL1LossLayer的实现在caffe-fast-rcnn/src/caffe/layers下的4个文件中
- roi_pooling_layer.cpp
- roi_pooling_layer.cu
- smooth_L1_loss_layer.cpp
- smooth_L1_loss_layer.cu
ROIPoolingLayer和SmoothL1LossLayer的测试在caffe-fast-rcnn/src/caffe/test下的2个文件中
- test_roi_pooling_layer.cpp
- test_smooth_L1_loss_layer.cpp
在caffe-fast-rcnn/src/caffe/proto/caffe.proto中添加ROIPoolingParameter和SmoothL1LossParameter,让ProtoBuf支持ROIPoolingLayer和SmoothL1LossLayer的识别。
不需要在在layer_factory.cpp添加代码。
参考阅读:
how to develop new layers, https://github.com/BVLC/caffe/issues/684