From 47556689d4bb53237470bdc9deca5e54df5bda8b Mon Sep 17 00:00:00 2001 From: dongzhihong Date: Sun, 30 Jul 2017 22:38:43 +0800 Subject: [PATCH] "remove unused code" --- paddle/operators/random_op.cc | 2 -- python/paddle/v2/framework/tests/test_random_op.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/operators/random_op.cc b/paddle/operators/random_op.cc index 16e526dc4f6..674c8513452 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 1c9ff350df8..d3474880d36 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() -- GitLab