Refine reduce_op unit test and add newline at end of file

update-doc-pybind
guosheng 8 years ago
parent 8b3bf28c6b
commit 1295e5ef54

@ -43,4 +43,4 @@ REGISTER_OP_GPU_KERNEL(
ops::ReduceKernel<paddle::platform::GPUPlace, float, ops::MinFunctor>);
REGISTER_OP_GPU_KERNEL(reduce_min_grad,
ops::ReduceGradKernel<paddle::platform::GPUPlace, float,
ops::MaxOrMinGradFunctor>);
ops::MaxOrMinGradFunctor>);

@ -60,7 +60,7 @@ class TestKeepDimReduce(OpTest):
def setUp(self):
self.op_type = "reduce_sum"
self.inputs = {'X': np.random.random((5, 6, 10)).astype("float32")}
self.attrs = {'dim': -2, 'keep_dim': 1}
self.attrs = {'dim': -2, 'keep_dim': True}
self.outputs = {
'Out': self.inputs['X'].sum(axis=self.attrs['dim'], keepdims=True)
}

Loading…
Cancel
Save