今天写了部分代码,在添加到项目中后就那些编译,出现问题以下:spa
logistic_regression_layer.h:20:16: error: expected class name public Layer{
部分源代码:code
template <typename Dtype> class Logistic_regression_layer : public Layer{
刚开始觉得是makefile 没有写好,仔细核对后,发现原来继承类Layer用的模板类,在继承的时候没有指定类型。而形成这个错误. 耽误好几个小时,跪.blog
改成这个以后,顺利经过,记录下这个有趣的过程. 继承
using mxnet::cpp::Symbol; using mxnet::cpp::NDArray; template <typename Dtype> class Logistic_regression_layer : public Layer<Dtype>{
完.io