How to use Crop in C++
I have found the C++ wrapper of crop at here,but I don't know how to use it. for in caffe model,the crop has two input and one output,but in this c++ wrapper,it shows
inline Symbol Crop(const std::string& symbol_name,
int num_args,
Shape offset = Shape(0, 0),
Shape h_w = Shape(0, 0),
bool center_crop = false) {
return Operator("Crop")
.SetParam("num_args", num_args)
.SetParam("offset", offset)
.SetParam("h_w", h_w)
.SetParam("center_crop", center_crop)
.CreateSymbol(symbol_name);
}
I don't know where to define the input symbol,and in the comment ,it also says
* \param num_args Number of inputs for crop, if equals one, then we will use
* the h_wfor crop heihgt and width, else if equals two, then we will
* use the heightand width of the second input symbol, we name crop_like here
You can find examples in python examples.
FYI. I spent many times mxnet.cpp implementing missing features and I ended up just using python interface because mxnet.cpp incomplete. it basically not implemented or partially implementing in progress, missing parameters, not tested and even basic symbol operators are just declared yet not implemented. Furthermore, Bigger problem is implementing optimizer requires modification of mxnet library itself. All option you have is just using ccsgd and basic thread synchronization is not guaranteed and bugged somewhere you'll eventually get access violations everywhere.
@christallire Thak you for this ,but my boss want me to use the c++ version of Mxnet.
Who have the same problem can refer to https://github.com/dmlc/MXNet.cpp/issues/16#issuecomment-202657451