Skip to content

Commit

Permalink
Merge pull request #3556 from reyoung/feature/enable_sgd_op_unittest
Browse files Browse the repository at this point in the history
Enable test_sgd_op
  • Loading branch information
jacquesqiao authored Aug 18, 2017
2 parents 428ce90 + 789263b commit e732b0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/operators/sgd_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SGDOpKernel : public framework::OpKernel {
void Compute(const framework::ExecutionContext& ctx) const override {
auto param = ctx.Input<Tensor>("param");
auto grad = ctx.Input<Tensor>("grad");
auto param_out = ctx.Output<Tensor>(0);
auto param_out = ctx.Output<Tensor>("param_out");
float lr = ctx.op_.GetAttr<float>("learning_rate");

param_out->mutable_data<T>(ctx.GetPlace());
Expand Down
1 change: 1 addition & 0 deletions python/paddle/v2/framework/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ py_test(test_operator SRCS test_operator.py)
# py_test(test_gaussian_random_op SRCS test_gaussian_random_op.py)
py_test(test_uniform_random_op SRCS test_uniform_random_op.py)
py_test(test_recurrent_op SRCS test_recurrent_op.py)
py_test(test_sgd_op SRCS test_sgd_op.py)
py_test(test_gradient_checker SRCS test_gradient_checker.py)

0 comments on commit e732b0a

Please sign in to comment.