diff --git a/paddle/fluid/operators/py_layer_op.h b/paddle/fluid/operators/py_layer_op.h index d80faab90b223622ef18b6244325206bb12156bf..6625a4a1a753c9ab5c2a1f735e96d8e2ae99e1dc 100644 --- a/paddle/fluid/operators/py_layer_op.h +++ b/paddle/fluid/operators/py_layer_op.h @@ -54,7 +54,7 @@ class PyLayerOp : public framework::OperatorWithKernel { protected: framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const override { - auto data_type = OperatorWithKernel::IndicateVarDataType(ctx, "X"); + auto data_type = paddle::framework::proto::VarType::Type::VarType_Type_FP32; return framework::OpKernelType(data_type, ctx.device_context()); }