我试图用caffe绘制图层,如下所示。
int ncols =(int)(sqrt(blob.channels())); int nrows; 如果(blob.channels()%NCOLS!= 0){ nrows = ncols + 1; }
int Rows = nrows * …
该错误转换为“您将const对象传递为 this 非const方法的参数 mutable_cpu_data “
this
mutable_cpu_data
const Dtype* cpu_data() const; Dtype* mutable_cpu_data();
“将物体传递给 this 参数“建议使用运算符。或 - >来访问对象的方法和使用operator()。
如果你这样做,你可能会改变const对象,所以这是一个错误,除非使用了许可模式。