From 4f122c07600bea33a764dffef7524469d8f1890b Mon Sep 17 00:00:00 2001 From: emailweixu Date: Thu, 15 Feb 2018 15:36:40 -0800 Subject: [PATCH] Remove incorrect statement in compare_op.h (#8416) The type of tensor z should be bool. And there's no need to call mutable_data because ElementwiseComputeEx will do it. --- paddle/fluid/operators/compare_op.h | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/fluid/operators/compare_op.h b/paddle/fluid/operators/compare_op.h index d7b62782fc..7e78269cf4 100644 --- a/paddle/fluid/operators/compare_op.h +++ b/paddle/fluid/operators/compare_op.h @@ -67,7 +67,6 @@ class CompareOpKernel auto* x = context.Input("X"); auto* y = context.Input("Y"); auto* z = context.Output("Out"); - z->mutable_data(context.GetPlace()); int axis = context.Attr("axis"); ElementwiseComputeEx(context, x, y, axis, Functor(), z); -- GitLab