diff --git a/paddle/fluid/operators/huber_loss_op.h b/paddle/fluid/operators/huber_loss_op.h index fa21bd01cb052e5393385f0ef6c0203fc7c9e1a3..7000b5d3acc07d722c0129f86f0cfa2ee65b4288 100644 --- a/paddle/fluid/operators/huber_loss_op.h +++ b/paddle/fluid/operators/huber_loss_op.h @@ -41,7 +41,7 @@ struct HuberLossForward { T delta; }; -template +template class HuberLossKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { @@ -49,7 +49,7 @@ class HuberLossKernel : public framework::OpKernel { auto* in1 = context.Input("Y"); auto* out0 = context.Output("Residual"); auto* out1 = context.Output("Out"); - auto delta = static_cast(context.Attr("delta")); + auto delta = static_cast(context.Attr("delta")); auto& place = *context.template device_context().eigen_device(); @@ -86,7 +86,7 @@ struct HuberLossBackward { T delta; }; -template +template class HuberLossGradKernel : public framework::OpKernel { public: void Compute(const framework::ExecutionContext& context) const override { @@ -94,7 +94,7 @@ class HuberLossGradKernel : public framework::OpKernel { auto* in1 = context.Input(framework::GradVarName("Out")); auto* out0 = context.Output(framework::GradVarName("X")); auto* out1 = context.Output(framework::GradVarName("Y")); - auto delta = static_cast(context.op().Attr("delta")); + auto delta = static_cast(context.op().Attr("delta")); auto& place = *context.template device_context().eigen_device();