From 1a30667dec205696e0b04d2614710e63faaaef67 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Thu, 13 Feb 2020 15:23:37 +0800 Subject: [PATCH] Clean up pyreader vestiges (#228) --- demo/mask_rcnn_demo.ipynb | 2 +- ppdet/modeling/architectures/cascade_mask_rcnn.py | 2 +- ppdet/modeling/architectures/cascade_rcnn.py | 2 +- ppdet/modeling/architectures/cascade_rcnn_cls_aware.py | 2 +- ppdet/modeling/architectures/faster_rcnn.py | 2 +- ppdet/modeling/architectures/mask_rcnn.py | 2 +- ppdet/modeling/architectures/retinanet.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demo/mask_rcnn_demo.ipynb b/demo/mask_rcnn_demo.ipynb index f767cf748..5027ce1e4 100644 --- a/demo/mask_rcnn_demo.ipynb +++ b/demo/mask_rcnn_demo.ipynb @@ -216,7 +216,7 @@ "with fluid.program_guard(infer_prog, startup_prog):\n", " with fluid.unique_name.guard():\n", " feed_vars = {\n", - " var['name']: fluid.layers.data(\n", + " var['name']: fluid.data(\n", " name=var['name'],\n", " shape=var['shape'],\n", " dtype='float32',\n", diff --git a/ppdet/modeling/architectures/cascade_mask_rcnn.py b/ppdet/modeling/architectures/cascade_mask_rcnn.py index 335e53cd1..168ce29aa 100644 --- a/ppdet/modeling/architectures/cascade_mask_rcnn.py +++ b/ppdet/modeling/architectures/cascade_mask_rcnn.py @@ -411,7 +411,7 @@ class CascadeMaskRCNN(object): 'lod_level': 1 } fields += box_fields - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], diff --git a/ppdet/modeling/architectures/cascade_rcnn.py b/ppdet/modeling/architectures/cascade_rcnn.py index 7f57d932d..b239e4d66 100644 --- a/ppdet/modeling/architectures/cascade_rcnn.py +++ b/ppdet/modeling/architectures/cascade_rcnn.py @@ -312,7 +312,7 @@ class CascadeRCNN(object): fields += ms_fields self.im_info_names = ['image', 'im_info'] + ms_fields - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], diff --git a/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py b/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py index 2f9696db9..4c3955fd5 100644 --- a/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py +++ b/ppdet/modeling/architectures/cascade_rcnn_cls_aware.py @@ -195,7 +195,7 @@ class CascadeRCNNClsAware(object): use_dataloader=True, iterable=False): inputs_def = self._inputs_def(image_shape) - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], diff --git a/ppdet/modeling/architectures/faster_rcnn.py b/ppdet/modeling/architectures/faster_rcnn.py index 57a8ffb06..239af6078 100644 --- a/ppdet/modeling/architectures/faster_rcnn.py +++ b/ppdet/modeling/architectures/faster_rcnn.py @@ -224,7 +224,7 @@ class FasterRCNN(object): fields += ms_fields self.im_info_names = ['image', 'im_info'] + ms_fields - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], diff --git a/ppdet/modeling/architectures/mask_rcnn.py b/ppdet/modeling/architectures/mask_rcnn.py index 019a4bda7..3ae289832 100644 --- a/ppdet/modeling/architectures/mask_rcnn.py +++ b/ppdet/modeling/architectures/mask_rcnn.py @@ -314,7 +314,7 @@ class MaskRCNN(object): 'lod_level': 1 } fields += box_fields - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], diff --git a/ppdet/modeling/architectures/retinanet.py b/ppdet/modeling/architectures/retinanet.py index e4613aedf..936a4ba4f 100644 --- a/ppdet/modeling/architectures/retinanet.py +++ b/ppdet/modeling/architectures/retinanet.py @@ -107,7 +107,7 @@ class RetinaNet(object): use_dataloader=True, iterable=False): inputs_def = self._inputs_def(image_shape) - feed_vars = OrderedDict([(key, fluid.layers.data( + feed_vars = OrderedDict([(key, fluid.data( name=key, shape=inputs_def[key]['shape'], dtype=inputs_def[key]['dtype'], -- GitLab