diff --git a/02.recognize_digits/train.py b/02.recognize_digits/train.py index 050474b6a8b0d655972e7ed324ac9257ff33e635..b553847b5eb385b342296ec1f57c00b1bf0eed56 100644 --- a/02.recognize_digits/train.py +++ b/02.recognize_digits/train.py @@ -73,7 +73,7 @@ def main(): test_reader = paddle.batch(paddle.dataset.mnist.test(), batch_size=64) - use_cuda = False # set to True if training with GPU + use_cuda = False # set to True if training with GPU place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace() trainer = fluid.Trainer( diff --git a/04.word2vec/train.py b/04.word2vec/train.py index a9f1d3cdee5ade9cc21dd97d93544bbd9adf146d..d0fb1b950c5ef0d170868ae129bf4bb9aee3b8e5 100644 --- a/04.word2vec/train.py +++ b/04.word2vec/train.py @@ -26,8 +26,7 @@ HIDDEN_SIZE = 256 N = 5 BATCH_SIZE = 100 - -use_cuda = False # set to True if training with GPU +use_cuda = False # set to True if training with GPU word_dict = paddle.dataset.imikolov.build_dict() dict_size = len(word_dict) diff --git a/06.understand_sentiment/train_conv.py b/06.understand_sentiment/train_conv.py index ee613975607740e29c045ef3746d3bffd4904442..3e3da736f8d186868bab8f37a77994c8b6db1161 100644 --- a/06.understand_sentiment/train_conv.py +++ b/06.understand_sentiment/train_conv.py @@ -162,5 +162,5 @@ def main(use_cuda): if __name__ == '__main__': - use_cuda = False # set to True if training with GPU + use_cuda = False # set to True if training with GPU main(use_cuda) diff --git a/06.understand_sentiment/train_dyn_rnn.py b/06.understand_sentiment/train_dyn_rnn.py index e8d2690452b691c3b00eabf3ffdee078ddb8876c..710a176c06cb898ec6f500b6f0e28e03bb974f15 100644 --- a/06.understand_sentiment/train_dyn_rnn.py +++ b/06.understand_sentiment/train_dyn_rnn.py @@ -179,5 +179,5 @@ def main(use_cuda): if __name__ == '__main__': - use_cuda = False # set to True if training with GPU + use_cuda = False # set to True if training with GPU main(use_cuda) diff --git a/06.understand_sentiment/train_stacked_lstm.py b/06.understand_sentiment/train_stacked_lstm.py index 708c4851eeba4b37b675b4ba196ffbf3524b7eb3..4c11251fecf30781465c857d1ad82ac040f09de6 100644 --- a/06.understand_sentiment/train_stacked_lstm.py +++ b/06.understand_sentiment/train_stacked_lstm.py @@ -170,5 +170,5 @@ def main(use_cuda): if __name__ == '__main__': - use_cuda = False # set to True if training with GPU + use_cuda = False # set to True if training with GPU main(use_cuda) diff --git a/08.machine_translation/train.py b/08.machine_translation/train.py index 7ae88100fbe144ff34367966ec8b84e28f23a063..c2dd5b53f595bc1db1efd5f7214dbd5f3c642bf7 100644 --- a/08.machine_translation/train.py +++ b/08.machine_translation/train.py @@ -128,5 +128,5 @@ def main(use_cuda): if __name__ == '__main__': - use_cuda = False # set to True if training with GPU + use_cuda = False # set to True if training with GPU main(use_cuda)