diff --git a/paddle/operators/mean_op.cu b/paddle/operators/mean_op.cu
index 4dbb566b1d769558c33584ff09e97bd3b7e229a8..740157cbc57a64cafcf109186c630691620f542b 100644
--- a/paddle/operators/mean_op.cu
+++ b/paddle/operators/mean_op.cu
@@ -1,4 +1,5 @@
-#include "paddle/framework/op_registry.h"
+#define EIGEN_USE_GPU
+
 #include "paddle/operators/mean_op.h"
 
-REGISTER_OP_GPU_KERNEL(mean, ops::AddKernel<ops::GPUPlace, float>);
+REGISTER_OP_GPU_KERNEL(mean, ops::MeanKernel<ops::GPUPlace, float>);
diff --git a/paddle/operators/mean_op.h b/paddle/operators/mean_op.h
index 21fa57964382062d66a7b7c736b0513af316f36a..483b3eb60157eaff9b4c3001461a1f2e3e36f846 100644
--- a/paddle/operators/mean_op.h
+++ b/paddle/operators/mean_op.h
@@ -26,8 +26,8 @@ public:
     auto output = context.Output(0)->GetMutable<Tensor>();
 
     output->mutable_data<T>(context.GetPlace());
-    EigenVector<T>::Flatten(*output).device(
-        *(context.GetEigenDevice<Place>())) =
+
+    EigenScalar<T>::From(*output).device(*(context.GetEigenDevice<Place>())) =
         EigenVector<T>::Flatten(input).mean();
   }
 };
diff --git a/paddle/pybind/CMakeLists.txt b/paddle/pybind/CMakeLists.txt
index 7d0e68a8f30de609b870c81c3bdb7aee090f15d3..845589dcb1997b662b5175e5cce320eec4be4a8d 100644
--- a/paddle/pybind/CMakeLists.txt
+++ b/paddle/pybind/CMakeLists.txt
@@ -1,2 +1,9 @@
-cc_library(paddle_pybind SHARED SRCS pybind.cc DEPS pybind python
-        add_op fc_op sgd_op cross_entropy_op recurrent_network_op)
+cc_library(paddle_pybind SHARED
+    SRCS pybind.cc
+    DEPS pybind python
+	fc_op
+	sgd_op
+	add_op
+	mean_op
+	cross_entropy_op
+	recurrent_network_op)
diff --git a/paddle/pybind/pybind.cc b/paddle/pybind/pybind.cc
index 08a8bd0d8b6177ce757b0d451164b7912bf48179..4fa481bedf5a0a9b8474c01ebe06ee132ea66a91 100644
--- a/paddle/pybind/pybind.cc
+++ b/paddle/pybind/pybind.cc
@@ -33,6 +33,7 @@ USE_OP(onehot_cross_entropy);
 USE_OP_WITHOUT_KERNEL(fc);
 USE_OP(sgd);
 USE_OP(mul);
+USE_OP(mean);
 USE_OP(sigmoid);
 USE_OP(softmax);
 USE_OP(rowwise_add);
diff --git a/python/paddle/v2/framework/tests/CMakeLists.txt b/python/paddle/v2/framework/tests/CMakeLists.txt
index cdaaa60674937c68c38656a5046bcb29f44d6c8b..540636a0e8100fbf97231bd548dbc1176b07daca 100644
--- a/python/paddle/v2/framework/tests/CMakeLists.txt
+++ b/python/paddle/v2/framework/tests/CMakeLists.txt
@@ -10,6 +10,7 @@ add_python_test(test_framework
     test_sgd_op.py
     test_cross_entropy_op.py
     test_mul_op.py
+    test_mean_op.py
     test_sigmoid_op.py
     test_softmax_op.py
     test_rowwise_add_op.py
diff --git a/python/paddle/v2/framework/tests/test_mean_op.py b/python/paddle/v2/framework/tests/test_mean_op.py
new file mode 100644
index 0000000000000000000000000000000000000000..78fff1eeff998109a51ea662f963a102eff49d3a
--- /dev/null
+++ b/python/paddle/v2/framework/tests/test_mean_op.py
@@ -0,0 +1,16 @@
+import unittest
+from op_test_util import OpTestMeta
+import numpy as np
+
+
+class TestMeanOp(unittest.TestCase):
+    __metaclass__ = OpTestMeta
+
+    def setUp(self):
+        self.type = "mean"
+        self.X = np.random.random((32, 784)).astype("float32")
+        self.Out = np.mean(self.X)
+
+
+if __name__ == '__main__':
+    unittest.main()