| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #ifndef LAYER_CROP_H |
| | #define LAYER_CROP_H |
| |
|
| | #include "layer.h" |
| |
|
| | namespace ncnn { |
| |
|
| | class Crop : public Layer |
| | { |
| | public: |
| | Crop(); |
| |
|
| | virtual int load_param(const ParamDict& pd); |
| |
|
| | virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; |
| |
|
| | virtual int forward(const std::vector<Mat>& bottom_blobs, std::vector<Mat>& top_blobs, const Option& opt) const; |
| |
|
| | protected: |
| | void resolve_crop_roi(const Mat& bottom_blob, int& woffset, int& hoffset, int& doffset, int& coffset, int& outw, int& outh, int& outd, int& outc) const; |
| | void resolve_crop_roi(const Mat& bottom_blob, const Mat& reference_blob, int& woffset, int& hoffset, int& doffset, int& coffset, int& outw, int& outh, int& outd, int& outc) const; |
| | void resolve_crop_roi(const Mat& bottom_blob, const int* param_data, int& woffset, int& hoffset, int& doffset, int& coffset, int& outw, int& outh, int& outd, int& outc) const; |
| |
|
| | public: |
| | |
| | int woffset; |
| | int hoffset; |
| | int doffset; |
| | int coffset; |
| |
|
| | |
| | int outw; |
| | int outh; |
| | int outd; |
| | int outc; |
| |
|
| | |
| | |
| | int woffset2; |
| | int hoffset2; |
| | int doffset2; |
| | int coffset2; |
| |
|
| | |
| | |
| | Mat starts; |
| | Mat ends; |
| | Mat axes; |
| | }; |
| |
|
| | } |
| |
|
| | #endif |
| |
|