From a0510ad9682379ad9483d897a65f5a10a802da15 Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Thu, 9 Jan 2020 10:43:33 +0800 Subject: [PATCH] Polish optimizer name in 04.word2vec (#841) * change opt name in word2vec * update index.cn.html --- 04.word2vec/README.cn.md | 4 ++-- 04.word2vec/README.md | 4 ++-- 04.word2vec/index.cn.html | 4 ++-- 04.word2vec/index.html | 4 ++-- 04.word2vec/train.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/04.word2vec/README.cn.md b/04.word2vec/README.cn.md index c7d9654..c0ea329 100644 --- a/04.word2vec/README.cn.md +++ b/04.word2vec/README.cn.md @@ -351,8 +351,8 @@ def train(if_use_cuda, params_dirname, is_sparse=True): avg_cost = train_program(predict_word) test_program = main_program.clone(for_test=True) - sgd_optimizer = optimizer_func() - sgd_optimizer.minimize(avg_cost) + optimizer = optimizer_func() + optimizer.minimize(avg_cost) exe = fluid.Executor(place) diff --git a/04.word2vec/README.md b/04.word2vec/README.md index a859d48..e802187 100644 --- a/04.word2vec/README.md +++ b/04.word2vec/README.md @@ -316,8 +316,8 @@ def train(if_use_cuda, params_dirname, is_sparse=True): avg_cost = train_program(predict_word) test_program = main_program.clone(for_test=True) - sgd_optimizer = optimizer_func() - sgd_optimizer.minimize(avg_cost) + optimizer = optimizer_func() + optimizer.minimize(avg_cost) exe = fluid.Executor(place) diff --git a/04.word2vec/index.cn.html b/04.word2vec/index.cn.html index 10374b9..f1edf9d 100644 --- a/04.word2vec/index.cn.html +++ b/04.word2vec/index.cn.html @@ -393,8 +393,8 @@ def train(if_use_cuda, params_dirname, is_sparse=True): avg_cost = train_program(predict_word) test_program = main_program.clone(for_test=True) - sgd_optimizer = optimizer_func() - sgd_optimizer.minimize(avg_cost) + optimizer = optimizer_func() + optimizer.minimize(avg_cost) exe = fluid.Executor(place) diff --git a/04.word2vec/index.html b/04.word2vec/index.html index e907896..a3dcf0c 100644 --- a/04.word2vec/index.html +++ b/04.word2vec/index.html @@ -358,8 +358,8 @@ def train(if_use_cuda, params_dirname, is_sparse=True): avg_cost = train_program(predict_word) test_program = main_program.clone(for_test=True) - sgd_optimizer = optimizer_func() - sgd_optimizer.minimize(avg_cost) + optimizer = optimizer_func() + optimizer.minimize(avg_cost) exe = fluid.Executor(place) diff --git a/04.word2vec/train.py b/04.word2vec/train.py index 2b3a972..476c326 100644 --- a/04.word2vec/train.py +++ b/04.word2vec/train.py @@ -122,8 +122,8 @@ def train(if_use_cuda, params_dirname, is_sparse=True): avg_cost = train_program(predict_word) test_program = main_program.clone(for_test=True) - sgd_optimizer = optimizer_func() - sgd_optimizer.minimize(avg_cost) + optimizer = optimizer_func() + optimizer.minimize(avg_cost) exe = fluid.Executor(place) -- GitLab