From 413ba962321edc17fb696c151db084b2288335f1 Mon Sep 17 00:00:00 2001 From: gongweibao Date: Sun, 5 Mar 2017 22:54:18 +0800 Subject: [PATCH] fix style --- fit_a_line/train.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fit_a_line/train.py b/fit_a_line/train.py index ca2cb0f..7381abe 100644 --- a/fit_a_line/train.py +++ b/fit_a_line/train.py @@ -1,6 +1,7 @@ import paddle.v2 as paddle import paddle.v2.dataset.uci_housing as uci_housing + def main(): # init paddle.init(use_gpu=False, trainer_count=1) @@ -25,8 +26,7 @@ def main(): parameters=parameters, update_equation=optimizer) - reader_dict={'x': 0, - 'y': 1} + reader_dict = {'x': 0, 'y': 1} # event_handler to print training and testing info def event_handler(event): @@ -52,5 +52,6 @@ def main(): event_handler=event_handler, num_passes=30) + if __name__ == '__main__': main() -- GitLab