diff --git a/paddle/operators/random_op.cc b/paddle/operators/random_op.cc index 16e526dc4f62cbec83dfa38119467de83ea796bf..674c85134529c3bfb7a8810c9a1ee15fe249c05a 100644 --- a/paddle/operators/random_op.cc +++ b/paddle/operators/random_op.cc @@ -26,7 +26,6 @@ public: void Compute(const framework::KernelContext& context) const override { auto mean = context.op_.GetAttr("mean"); auto std = context.op_.GetAttr("std"); - // auto seed = context.op_.GetAttr("seed"); auto* output = context.Output(0)->GetMutable(); T* r = output->mutable_data(context.GetPlace()); auto ctx = @@ -60,7 +59,6 @@ public: framework::OpAttrChecker* op_checker) : framework::OpProtoAndCheckerMaker(proto, op_checker) { AddAttr>("shape", "The shape of matrix to be randomized"); - // AddAttr("seed", "random seed generator.").SetDefault(1337); AddAttr("mean", "mean value of random.").SetDefault(.0); AddAttr("std", "minimum value of random value") .SetDefault(1.0) diff --git a/python/paddle/v2/framework/tests/test_random_op.py b/python/paddle/v2/framework/tests/test_random_op.py index 1c9ff350df8e563f84c27e7b38c50e271a6fd993..d3474880d366421e3732f59634a0e25fb4ee6524 100644 --- a/python/paddle/v2/framework/tests/test_random_op.py +++ b/python/paddle/v2/framework/tests/test_random_op.py @@ -10,7 +10,7 @@ class TestRandomOp(unittest.TestCase): scope = core.Scope(None) # Out = scope.create_var("Out") op = creation.op_creations.gaussian_random( - shape=[1000, 1000], mean=5.0, std=1.0, seed=1701, Out="Out") + shape=[1000, 1000], mean=5.0, std=1.0, Out="Out") for out in op.outputs(): if scope.get_var(out) is None: scope.create_var(out).get_tensor()