提交 9920a06c 编写于 作者: H Helin Wang

rename local variable

上级 f4bc10da
...@@ -36,11 +36,11 @@ void release_SGD(void *optimizer) { ...@@ -36,11 +36,11 @@ void release_SGD(void *optimizer) {
} }
paddle_optimizer* paddle_create_SGD_optimizer(double learning_rate) { paddle_optimizer* paddle_create_SGD_optimizer(double learning_rate) {
SGD_optimizer* o = (SGD_optimizer*)malloc(sizeof(SGD_optimizer)); SGD_optimizer* impl = (SGD_optimizer*)malloc(sizeof(SGD_optimizer));
o->learning_rate = learning_rate; impl->learning_rate = learning_rate;
paddle_optimizer* container = (paddle_optimizer*)malloc(sizeof(paddle_optimizer)); paddle_optimizer* opt = (paddle_optimizer*)malloc(sizeof(paddle_optimizer));
container->update = update_SGD; opt->update = update_SGD;
container->release = release_SGD; opt->release = release_SGD;
container->optimizer = o; opt->optimizer = impl;
return container; return opt;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册