internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: PaddlePaddle/models

Issue:
policy_gradient 原理介绍部分内容格式存在问题
https://github.com/PaddlePaddle/models/tree/develop/fluid/policy_gradient 
policy_gradient  demo介绍部分，看起来格式存在问题，能辛苦调整下吗？或者以什么样的方式可以看到原始的文档呢？ @wanghaoshuang  @lcy-seso 


Discussion:
非常抱歉，公式渲染没处理好。
可以先参考这个内容完全一致的版本：https://wanghaoshuang.github.io/2017/12/Policy-Gradient-RL-by-PaddlePaddle/
嗯嗯，收到，非常感谢~
另外，我实验的时候发现 fluid 新版本的代码中，brain.py中47行 loss = fluid.layers.reduce_mean(x=neg_log_prob_weight)  
需要修正为 loss = fluid.layers.reduce_mean(neg_log_prob_weight)  才可以正常运行。

Resolving patch:
diff --git a/fluid/policy_gradient/brain.py b/fluid/policy_gradient/brain.py
--- a/fluid/policy_gradient/brain.py
+++ b/fluid/policy_gradient/brain.py
@@ -45,7 +45,7 @@ def build_net(self):
             label=acts)  # this is negative log of chosen action
         neg_log_prob_weight = fluid.layers.elementwise_mul(x=neg_log_prob, y=vt)
         loss = fluid.layers.reduce_mean(
-            x=neg_log_prob_weight)  # reward guided loss
+            neg_log_prob_weight)  # reward guided loss
 
         sgd_optimizer = fluid.optimizer.SGD(self.lr)
         sgd_optimizer.minimize(loss)


Test patch:
Repository: PaddlePaddle/models

Issue:
Need to fix the bug in bbox sampling of SSD.
Refer https://github.com/weiliu89/caffe/commit/6feb7d99d3c6938321c9afd21d8f397a7a33b0a4


Discussion:

Resolving patch:
diff --git a/fluid/face_detction/image_util.py b/fluid/face_detction/image_util.py
--- a/fluid/face_detction/image_util.py
+++ b/fluid/face_detction/image_util.py
@@ -37,9 +37,11 @@ def bbox_area(src_bbox):
 
 def generate_sample(sampler):
     scale = random.uniform(sampler.min_scale, sampler.max_scale)
-    min_aspect_ratio = max(sampler.min_aspect_ratio, (scale**2.0))
-    max_aspect_ratio = min(sampler.max_aspect_ratio, 1 / (scale**2.0))
-    aspect_ratio = random.uniform(min_aspect_ratio, max_aspect_ratio)
+    aspect_ratio = random.uniform(sampler.min_aspect_ratio,
+                                  sampler.max_aspect_ratio)
+    aspect_ratio = max(aspect_ratio, (scale**2.0))
+    aspect_ratio = min(aspect_ratio, 1 / (scale**2.0))
+
     bbox_width = scale * (aspect_ratio**0.5)
     bbox_height = scale / (aspect_ratio**0.5)
     xmin_bound = 1 - bbox_width
diff --git a/fluid/object_detection/image_util.py b/fluid/object_detection/image_util.py
--- a/fluid/object_detection/image_util.py
+++ b/fluid/object_detection/image_util.py
@@ -37,9 +37,11 @@ def bbox_area(src_bbox):
 
 def generate_sample(sampler):
     scale = random.uniform(sampler.min_scale, sampler.max_scale)
-    min_aspect_ratio = max(sampler.min_aspect_ratio, (scale**2.0))
-    max_aspect_ratio = min(sampler.max_aspect_ratio, 1 / (scale**2.0))
-    aspect_ratio = random.uniform(min_aspect_ratio, max_aspect_ratio)
+    aspect_ratio = random.uniform(sampler.min_aspect_ratio,
+                                  sampler.max_aspect_ratio)
+    aspect_ratio = max(aspect_ratio, (scale**2.0))
+    aspect_ratio = min(aspect_ratio, 1 / (scale**2.0))
+
     bbox_width = scale * (aspect_ratio**0.5)
     bbox_height = scale / (aspect_ratio**0.5)
     xmin_bound = 1 - bbox_width


Test patch:
Repository: PaddlePaddle/models

Issue:
You have error in image_classification/infer.py
### error message
```
Traceback (most recent call last):
  File "infer.py", line 94, in <module>
    main()
  File "infer.py", line 90, in main
    infer(args)
  File "infer.py", line 68, in infer
    test_reader = paddle.batch(reader.test(), batch_size=test_batch_size)
TypeError: test() takes exactly 1 argument (0 given)
```
### cause
The test function takes 1 argument
https://github.com/PaddlePaddle/models/blob/53937db0f1a29c90cd4e23c1198d34c81bfed1b2/fluid/image_classification/reader.py#L163
### command
```
python infer.py --use_gpu 0  --batch_size 1
```


Discussion:
How about change to 
```
def test(file_list=TEST_LIST):
```

Resolving patch:
diff --git a/fluid/image_classification/reader.py b/fluid/image_classification/reader.py
--- a/fluid/image_classification/reader.py
+++ b/fluid/image_classification/reader.py
@@ -160,5 +160,5 @@ def val(file_list=TEST_LIST):
     return _reader_creator(file_list, 'val', shuffle=False)
 
 
-def test(file_list):
+def test(file_list=TEST_LIST):
     return _reader_creator(file_list, 'test', shuffle=False)
diff --git a/fluid/image_classification/train.py b/fluid/image_classification/train.py
--- a/fluid/image_classification/train.py
+++ b/fluid/image_classification/train.py
@@ -157,7 +157,8 @@ def if_exist(var):
     test_reader = paddle.batch(reader.val(), batch_size=test_batch_size)
     feeder = fluid.DataFeeder(place=place, feed_list=[image, label])
 
-    train_exe = fluid.ParallelExecutor(use_cuda=True, loss_name=avg_cost.name)
+    train_exe = fluid.ParallelExecutor(
+        use_cuda=True if args.use_gpu else False, loss_name=avg_cost.name)
 
     fetch_list = [avg_cost.name, acc_top1.name, acc_top5.name]
 


Test patch:
Repository: PaddlePaddle/models

Issue:
will you support CPU training of Transformer?
https://github.com/PaddlePaddle/models/blob/ff63e48f5dd71143d7108198e71a61cdaa0895d9/fluid/neural_machine_translation/transformer/config.py#L2


Discussion:
transformer can run on CPU now. This annotation is due to some fails on ParallelExecutor before. We will remove this line.

Resolving patch:
diff --git a/fluid/neural_machine_translation/transformer/config.py b/fluid/neural_machine_translation/transformer/config.py
--- a/fluid/neural_machine_translation/transformer/config.py
+++ b/fluid/neural_machine_translation/transformer/config.py
@@ -1,5 +1,5 @@
 class TrainTaskConfig(object):
-    # only support GPU currently
+    # support both CPU and GPU now.
     use_gpu = True
     # the epoch number to train.
     pass_num = 30


Test patch:
Repository: PaddlePaddle/models

Issue:
image_classification分布式环境支持问题
image_classification的分布式运行尚未支持python3
dist_train的readme文档中trainer文档有误，trainer的PADDLE_TRAINING_ROLE应为trainer


Discussion:

Resolving patch:
diff --git a/fluid/image_classification/train.py b/fluid/image_classification/train.py
--- a/fluid/image_classification/train.py
+++ b/fluid/image_classification/train.py
@@ -33,7 +33,7 @@
 add_arg('lr_strategy',      str,   "piecewise_decay",    "Set the learning rate decay strategy.")
 add_arg('model',            str,   "SE_ResNeXt50_32x4d", "Set the network to use.")
 add_arg('enable_ce',        bool,  False,                "If set True, enable continuous evaluation job.")
-add_arg('data_dir'          str,   "./data/ILSVRC2012",  "The ImageNet dataset root dir.")
+add_arg('data_dir',         str,   "./data/ILSVRC2012",  "The ImageNet dataset root dir.")
 # yapf: enable
 
 model_list = [m for m in dir(models) if "__" not in m]


Test patch:
Repository: PaddlePaddle/models

Issue:
image_classification分布式运行在python环境下报错
dist_train.py文件中第310行print缺失括号
第294行for arg, value in sorted(vars(args).iteritems()):报错'dict' object has no attribute 'iteritems'


Discussion:

Resolving patch:
diff --git a/fluid/image_classification/dist_train/dist_train.py b/fluid/image_classification/dist_train/dist_train.py
--- a/fluid/image_classification/dist_train/dist_train.py
+++ b/fluid/image_classification/dist_train/dist_train.py
@@ -22,6 +22,7 @@
 import paddle
 import paddle.fluid as fluid
 import paddle.fluid.core as core
+import six
 import sys
 sys.path.append("..")
 import models
@@ -172,7 +173,7 @@ def dist_transpile(trainer_id, args, train_prog, startup_prog):
 
 def test_parallel(exe, test_args, args, test_prog, feeder):
     acc_evaluators = []
-    for i in xrange(len(test_args[2])):
+    for i in six.moves.xrange(len(test_args[2])):
         acc_evaluators.append(fluid.metrics.Accuracy())
 
     to_fetch = [v.name for v in test_args[2]]
@@ -291,7 +292,7 @@ def train_parallel(train_args, test_args, args, train_prog, test_prog,
 
 def print_arguments(args):
     print('----------- Configuration Arguments -----------')
-    for arg, value in sorted(vars(args).iteritems()):
+    for arg, value in sorted(six.iteritems(vars(args))):
         print('%s: %s' % (arg, value))
     print('------------------------------------------------')
 
@@ -307,7 +308,7 @@ def print_paddle_envs():
     print('----------- Configuration envs -----------')
     for k in os.environ:
         if "PADDLE_" in k:
-            print "ENV %s:%s" % (k, os.environ[k])
+            print("ENV %s:%s" % (k, os.environ[k]))
     print('------------------------------------------------')
 
 


Test patch:
Repository: PaddlePaddle/models

Issue:
ocr_recognition 的参数说明与代码不相符
说明中的 --train_images 与 --train_list 两个参数，在代码中并不存在；运行时，带上这两个参数会报错。


Discussion:
多谢反馈，我尽快修改下。

Resolving patch:
diff --git a/fluid/PaddleCV/ocr_recognition/train.py b/fluid/PaddleCV/ocr_recognition/train.py
--- a/fluid/PaddleCV/ocr_recognition/train.py
+++ b/fluid/PaddleCV/ocr_recognition/train.py
@@ -24,6 +24,10 @@
 add_arg('save_model_period', int,   15000,      "Save model period. '-1' means never saving the model.")
 add_arg('eval_period',       int,   15000,      "Evaluate period. '-1' means never evaluating the model.")
 add_arg('save_model_dir',    str,   "./models", "The directory the model to be saved to.")
+add_arg('train_images',      str,   None,       "The directory of images to be used for training.")
+add_arg('train_list',        str,   None,       "The list file of images to be used for training.")
+add_arg('test_images',       str,   None,       "The directory of images to be used for test.")
+add_arg('test_list',         str,   None,       "The list file of images to be used for training.")
 add_arg('model',    str,   "crnn_ctc",           "Which type of network to be used. 'crnn_ctc' or 'attention'")
 add_arg('init_model',        str,   None,       "The init model file of directory.")
 add_arg('use_gpu',           bool,  True,      "Whether use GPU to train.")
@@ -48,10 +52,6 @@ def train(args):
         get_feeder_data = get_attention_feeder_data
 
     num_classes = None
-    train_images = None
-    train_list = None
-    test_images = None
-    test_list = None
     num_classes = data_reader.num_classes(
     ) if num_classes is None else num_classes
     data_shape = data_reader.data_shape()
@@ -62,12 +62,12 @@ def train(args):
     # data reader
     train_reader = data_reader.train(
         args.batch_size,
-        train_images_dir=train_images,
-        train_list_file=train_list,
+        train_images_dir=args.train_images,
+        train_list_file=args.train_list,
         cycle=args.total_step > 0,
         model=args.model)
     test_reader = data_reader.test(
-        test_images_dir=test_images, test_list_file=test_list, model=args.model)
+        test_images_dir=args.test_images, test_list_file=args.test_list, model=args.model)
 
     # prepare environment
     place = fluid.CPUPlace()


Test patch:
Repository: PaddlePaddle/models

Issue:
deeplabv3+在python3.6下报错
deeplabv3+在ubuntu14 cuda8 cudnn7 python3.6下有个报错，报错内容如下：
Traceback (most recent call last):
  File "./train.py", line 148, in <module>
    load_model()
  File "./train.py", line 54, in load_model
    exe, dirname=args.init_weights_path, main_program=tp)
  File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/io.py", line 487, in load_params
    filename=filename)
  File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/io.py", line 395, in load_vars
    filename=filename)
  File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/io.py", line 436, in load_vars
    executor.run(load_prog)
  File "/usr/local/lib/python3.6/dist-packages/paddle/fluid/executor.py", line 472, in run
    self.executor.run(program.desc, scope, 0, True, True)
paddle.fluid.core.EnforceNotMet: Cannot open file deeplabv3plus_xception65_initialize.params/xception_65/entry_flow/conv1/weights for load op at [/home/Paddle/paddle/fluid/operators/load_op.cc:39]



Discussion:
@cjld Please help to fix this.

Resolving patch:
diff --git a/fluid/PaddleCV/deeplabv3+/train.py b/fluid/PaddleCV/deeplabv3+/train.py
--- a/fluid/PaddleCV/deeplabv3+/train.py
+++ b/fluid/PaddleCV/deeplabv3+/train.py
@@ -34,7 +34,10 @@ def add_arguments():
     add_argument('parallel', bool, False, "using ParallelExecutor.")
     add_argument('use_gpu', bool, True, "Whether use GPU or CPU.")
     add_argument('num_classes', int, 19, "Number of classes.")
-    parser.add_argument('--enable_ce', action='store_true', help='If set, run the task with continuous evaluation logs.')
+    parser.add_argument(
+        '--enable_ce',
+        action='store_true',
+        help='If set, run the task with continuous evaluation logs.')
 
 
 def load_model():
@@ -52,7 +55,10 @@ def load_model():
     else:
         if args.num_classes == 19:
             fluid.io.load_params(
-                exe, dirname=args.init_weights_path, main_program=tp)
+                exe,
+                dirname="",
+                filename=args.init_weights_path,
+                main_program=tp)
         else:
             fluid.io.load_vars(
                 exe, dirname="", filename=args.init_weights_path, vars=myvars)
@@ -93,6 +99,7 @@ def get_cards(args):
     else:
         return args.num_devices
 
+
 CityscapeDataset = reader.CityscapeDataset
 parser = argparse.ArgumentParser()
 
@@ -202,9 +209,8 @@ def get_cards(args):
 if args.enable_ce:
     gpu_num = get_cards(args)
     print("kpis\teach_pass_duration_card%s\t%s" %
-            (gpu_num, total_time / epoch_idx))
-    print("kpis\ttrain_loss_card%s\t%s" %
-            (gpu_num, train_loss))
+          (gpu_num, total_time / epoch_idx))
+    print("kpis\ttrain_loss_card%s\t%s" % (gpu_num, train_loss))
 
 print("Training done. Model is saved to", args.save_weights_path)
 save_model()


Test patch:
Repository: PaddlePaddle/models

Issue:
neural_machine_translation/transformer无法运行
环境：ubuntu16 cuda9 python3.6 paddle的develop分支
transformer无法运行，也没有报错信息，卡在了下图所示的状态中：
<img width="822" alt="325439b96b545d8b859a869ee4b0bcd8" src="https://user-images.githubusercontent.com/46314656/51523092-dd9b8d80-1e65-11e9-9482-91cc3ff3d1ca.png">




Discussion:
GPU类型:P40
原因已查明，模型是在运行，但是没有log输出。
在脚本中添加这句话就可以了
```
logging.getLogger().setLevel(logging.INFO)
```

Resolving patch:
diff --git a/fluid/PaddleNLP/neural_machine_translation/transformer/train.py b/fluid/PaddleNLP/neural_machine_translation/transformer/train.py
--- a/fluid/PaddleNLP/neural_machine_translation/transformer/train.py
+++ b/fluid/PaddleNLP/neural_machine_translation/transformer/train.py
@@ -408,10 +408,19 @@ def test_context(exe, train_exe, dev_count):
     test_data = prepare_data_generator(
         args, is_test=True, count=dev_count, pyreader=pyreader)
 
-    exe.run(startup_prog)
+    exe.run(startup_prog)  # to init pyreader for testing
+    if TrainTaskConfig.ckpt_path:
+        fluid.io.load_persistables(
+            exe, TrainTaskConfig.ckpt_path, main_program=test_prog)
+
+    exec_strategy = fluid.ExecutionStrategy()
+    exec_strategy.use_experimental_executor = True
+    build_strategy = fluid.BuildStrategy()
     test_exe = fluid.ParallelExecutor(
         use_cuda=TrainTaskConfig.use_gpu,
         main_program=test_prog,
+        build_strategy=build_strategy,
+        exec_strategy=exec_strategy,
         share_vars_from=train_exe)
 
     def test(exe=test_exe, pyreader=pyreader):
@@ -457,7 +466,11 @@ def train_loop(exe,
                nccl2_trainer_id=0):
     # Initialize the parameters.
     if TrainTaskConfig.ckpt_path:
-        fluid.io.load_persistables(exe, TrainTaskConfig.ckpt_path)
+        exe.run(startup_prog)  # to init pyreader for training
+        logging.info("load checkpoint from {}".format(
+            TrainTaskConfig.ckpt_path))
+        fluid.io.load_persistables(
+            exe, TrainTaskConfig.ckpt_path, main_program=train_prog)
     else:
         logging.info("init fluid.framework.default_startup_program")
         exe.run(startup_prog)
@@ -741,6 +754,7 @@ def train(args):
     LOG_FORMAT = "[%(asctime)s %(levelname)s %(filename)s:%(lineno)d] %(message)s"
     logging.basicConfig(
         stream=sys.stdout, level=logging.DEBUG, format=LOG_FORMAT)
+    logging.getLogger().setLevel(logging.INFO)
 
     args = parse_args()
     train(args)


Test patch:
Repository: PaddlePaddle/models

Issue:
文本分类text_classification训练选项不匹配
1. train.py中batch_size参数冗余

2. 命令行选项gru配置错误

3. GRU Layer embedding学习率默认配置过大，导致模型训练补课收敛。


Discussion:

Resolving patch:
diff --git a/fluid/PaddleNLP/text_classification/nets.py b/fluid/PaddleNLP/text_classification/nets.py
--- a/fluid/PaddleNLP/text_classification/nets.py
+++ b/fluid/PaddleNLP/text_classification/nets.py
@@ -101,7 +101,7 @@ def gru_net(data,
             hid_dim=128,
             hid_dim2=96,
             class_dim=2,
-            emb_lr=400.0):
+            emb_lr=30.0):
     """
     gru net
     """
diff --git a/fluid/PaddleNLP/text_classification/train.py b/fluid/PaddleNLP/text_classification/train.py
--- a/fluid/PaddleNLP/text_classification/train.py
+++ b/fluid/PaddleNLP/text_classification/train.py
@@ -22,7 +22,6 @@ def train(train_reader,
           parallel,
           save_dirname,
           lr=0.2,
-          batch_size=128,
           pass_num=30):
     """
     train network
@@ -100,8 +99,7 @@ def train_net():
             parallel=False,
             save_dirname="bow_model",
             lr=0.002,
-            pass_num=30,
-            batch_size=4)
+            pass_num=30)
     elif sys.argv[1] == "cnn":
         train(
             train_reader,
@@ -111,8 +109,7 @@ def train_net():
             parallel=False,
             save_dirname="cnn_model",
             lr=0.01,
-            pass_num=30,
-            batch_size=4)
+            pass_num=30)
     elif sys.argv[1] == "lstm":
         train(
             train_reader,
@@ -122,19 +119,17 @@ def train_net():
             parallel=False,
             save_dirname="lstm_model",
             lr=0.05,
-            pass_num=30,
-            batch_size=4)
+            pass_num=30)
     elif sys.argv[1] == "gru":
         train(
             train_reader,
             word_dict,
-            lstm_net,
+            gru_net,
             use_cuda=True,
             parallel=False,
             save_dirname="gru_model",
             lr=0.05,
-            pass_num=30,
-            batch_size=4)
+            pass_num=30)
     else:
         print("network name cannot be found!")
         sys.exit(1)


Test patch:
Repository: PaddlePaddle/models

Issue:
ocr_recognition 评估、预测错误
1、ocr_recognition CTC model eval.py有函数缺少参数：
<img width="909" alt="e8ec154b99d031a872f8f222e1088e92" src="https://user-images.githubusercontent.com/46314656/53880163-453f1e00-404b-11e9-85c7-8dd84fe81020.png">
2、预测时CTC和attention模型的报错：
<img width="987" alt="93b4cc1a5a0309688355e42a33bddad7" src="https://user-images.githubusercontent.com/46314656/53880294-9e0eb680-404b-11e9-9619-47c6bdaff889.png">



Discussion:
https://github.com/PaddlePaddle/models/commit/c765794e0d8bd9e2f93a29962de89560ca1506be#diff-366b354acb1f3c3a449809e462657458R209
下载的是最新版本的models，运行python eval.py 报错信息如下：
![image](https://user-images.githubusercontent.com/37854899/54268250-c2bbde80-45b5-11e9-9c32-133e75759c99.png)
使用文档中提供的ocr_attention_params进行infer报错信息如下：
![image](https://user-images.githubusercontent.com/37854899/54268332-ee3ec900-45b5-11e9-8240-0083a142806c.png)
使用ocr_ctc_params进行infer正确。

Resolving patch:
diff --git a/PaddleCV/ocr_recognition/data_reader.py b/PaddleCV/ocr_recognition/data_reader.py
--- a/PaddleCV/ocr_recognition/data_reader.py
+++ b/PaddleCV/ocr_recognition/data_reader.py
@@ -10,6 +10,11 @@
 from paddle.dataset.image import load_image
 import paddle
 
+try:
+    input = raw_input
+except NameError:
+    pass
+
 SOS = 0
 EOS = 1
 NUM_CLASSES = 95
@@ -175,7 +180,7 @@ def yield_img_and_label(lines):
                         yield img, label
             else:
                 while True:
-                    img_path = raw_input("Please input the path of image: ")
+                    img_path = input("Please input the path of image: ")
                     img = Image.open(img_path).convert('L')
                     img = np.array(img) - 127.5
                     img = img[np.newaxis, ...]
diff --git a/PaddleCV/ocr_recognition/eval.py b/PaddleCV/ocr_recognition/eval.py
--- a/PaddleCV/ocr_recognition/eval.py
+++ b/PaddleCV/ocr_recognition/eval.py
@@ -31,7 +31,8 @@ def evaluate(args):
     num_classes = data_reader.num_classes()
     data_shape = data_reader.data_shape()
     # define network
-    evaluator, cost = eval(data_shape, num_classes)
+    evaluator, cost = eval(
+        data_shape, num_classes, use_cudnn=True if args.use_gpu else False)
 
     # data reader
     test_reader = data_reader.test(
@@ -62,8 +63,8 @@ def evaluate(args):
         count += 1
         exe.run(fluid.default_main_program(), feed=get_feeder_data(data, place))
     avg_distance, avg_seq_error = evaluator.eval(exe)
-    print("Read %d samples; avg_distance: %s; avg_seq_error: %s" % (
-        count, avg_distance, avg_seq_error))
+    print("Read %d samples; avg_distance: %s; avg_seq_error: %s" %
+          (count, avg_distance, avg_seq_error))
 
 
 def main():


Test patch:
Repository: PaddlePaddle/models

Issue:
icnet加载model_1000预训练模型进行训练报错
1.使用如下指令训练：python train.py --batch_size=16 --use_gpu=True --init_model="./model_1000/"  --checkpoint_path="./chkpnt/"
其中：/model_1000为文档中提供的预训练模型，其中并无conv6参数。
<img width="970" alt="bfd08a979fcb4f72bb443fbca3f53d3f" src="https://user-images.githubusercontent.com/37854899/54199980-24704000-4505-11e9-9bf4-70dc09b0cc86.png">
2. 文档中eval和infer中的model_path建议改为./chkpnt/100，与训练输出保持一致
![image](https://user-images.githubusercontent.com/37854899/54200167-aceee080-4505-11e9-9d1a-535a8a09df74.png)
![image](https://user-images.githubusercontent.com/37854899/54200175-b2e4c180-4505-11e9-8cb7-68e5020ebc60.png)




Discussion:
补充问题2中的截图：
![image](https://user-images.githubusercontent.com/37854899/54200504-854c4800-4506-11e9-8e2d-b7a43566dffe.png)
![image](https://user-images.githubusercontent.com/37854899/54200514-8aa99280-4506-11e9-82cc-bf66a4de9e32.png)

3. infer的log中建议添加预测输出结果保存在output文件夹内。现在文档中有提示预测结果保存在output文件夹，Infer log中仅显示loaded model from ./chkpnt/100/，建议也添加该提示。

Resolving patch:
diff --git a/PaddleCV/icnet/infer.py b/PaddleCV/icnet/infer.py
--- a/PaddleCV/icnet/infer.py
+++ b/PaddleCV/icnet/infer.py
@@ -122,6 +122,7 @@ def infer(args):
                          fetch_list=[predict])
         cv2.imwrite(args.out_path + "/" + filename + "_result.png",
                     color(result[0]))
+    print("Saved images into: %s" % args.out_path)
 
 
 def main():
diff --git a/PaddleCV/icnet/train.py b/PaddleCV/icnet/train.py
--- a/PaddleCV/icnet/train.py
+++ b/PaddleCV/icnet/train.py
@@ -96,8 +96,11 @@ def train(args):
 
     if args.init_model is not None:
         print("load model from: %s" % args.init_model)
-        sys.stdout.flush()
-        fluid.io.load_params(exe, args.init_model)
+
+        def if_exist(var):
+            return os.path.exists(os.path.join(args.init_model, var.name))
+
+        fluid.io.load_vars(exe, args.init_model, predicate=if_exist)
 
     iter_id = 0
     t_loss = 0.


Test patch: