未验证 提交 95934aca 编写于 作者: Q qingqing01 提交者: GitHub

Update docs (#653)

* Update docs
* Update README.md
上级 a65395fd
...@@ -44,7 +44,14 @@ ...@@ -44,7 +44,14 @@
| BlazeFace | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | | BlazeFace | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Faceboxes | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | | Faceboxes | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
<a name="vd">[1]</a> [ResNet-vd](https://arxiv.org/pdf/1812.01187) 模型提供了较大的精度提高和较少的性能损失。 <a name="vd">[1]</a> [ResNet-vd](https://arxiv.org/pdf/1812.01187) 模型预测速度基本不变的情况下提高了精度。
更多的模型:
- EfficientDet
- FCOS
- CornerNet-Squeeze
- YOLOv4
更多的Backone: 更多的Backone:
...@@ -52,10 +59,11 @@ ...@@ -52,10 +59,11 @@
- VGG - VGG
- GCNet - GCNet
- CBNet - CBNet
- Hourglass
扩展特性: 扩展特性:
- [x] **Synchronized Batch Norm**: 目前在YOLOv3中使用。 - [x] **Synchronized Batch Norm**
- [x] **Group Norm** - [x] **Group Norm**
- [x] **Modulated Deformable Convolution** - [x] **Modulated Deformable Convolution**
- [x] **Deformable PSRoI Pooling** - [x] **Deformable PSRoI Pooling**
...@@ -107,12 +115,14 @@ ...@@ -107,12 +115,14 @@
## 模型库 ## 模型库
- [模型库](docs/MODEL_ZOO_cn.md) - [模型库](docs/MODEL_ZOO_cn.md)
- [人脸检测模型](docs/featured_model/FACE_DETECTION.md) 开源BlazeFace系列模型,Wider-Face数据集上最高精度达到91.5%,同时具备了较高的预测性能
- [行人检测和车辆检测预训练模型](docs/featured_model/CONTRIB_cn.md) 针对不同场景的检测模型
- [YOLOv3增强模型](docs/featured_model/YOLOv3_ENHANCEMENT.md) 改进原始YOLOv3,精度达到43.6%,原论文精度为33.0%,同时预测速度也得到提升
- [Objects365 2019 Challenge夺冠模型](docs/featured_model/CACascadeRCNN.md) Objects365 Full Track任务中最好的单模型之一,精度达到31.7%
- [Open Images V5和Objects365数据集模型](docs/featured_model/OIDV5_BASELINE_MODEL.md)
- [移动端模型](configs/mobile/README.md) - [移动端模型](configs/mobile/README.md)
- [Anchor free模型](configs/anchor_free/README.md)
- [人脸检测模型](docs/featured_model/FACE_DETECTION.md)
- [YOLOv3增强模型](docs/featured_model/YOLOv3_ENHANCEMENT.md): COCO mAP高达43.6%,原论文精度为33.0%
- [行人检测预训练模型](docs/featured_model/CONTRIB_cn.md)
- [车辆检测预训练模型](docs/featured_model/CONTRIB_cn.md)
- [Objects365 2019 Challenge夺冠模型](docs/featured_model/CACascadeRCNN.md)
- [Open Images 2019-Object Detction比赛最佳单模型](docs/featured_model/OIDV5_BASELINE_MODEL.md)
## 许可证书 ## 许可证书
......
...@@ -59,6 +59,13 @@ Supported Architectures: ...@@ -59,6 +59,13 @@ Supported Architectures:
<a name="vd">[1]</a> [ResNet-vd](https://arxiv.org/pdf/1812.01187) models offer much improved accuracy with negligible performance cost. <a name="vd">[1]</a> [ResNet-vd](https://arxiv.org/pdf/1812.01187) models offer much improved accuracy with negligible performance cost.
More models:
- EfficientDet
- FCOS
- CornerNet-Squeeze
- YOLOv4
More Backbones: More Backbones:
- DarkNet - DarkNet
...@@ -68,7 +75,7 @@ More Backbones: ...@@ -68,7 +75,7 @@ More Backbones:
Advanced Features: Advanced Features:
- [x] **Synchronized Batch Norm**: currently used by YOLOv3. - [x] **Synchronized Batch Norm**
- [x] **Group Norm** - [x] **Group Norm**
- [x] **Modulated Deformable Convolution** - [x] **Modulated Deformable Convolution**
- [x] **Deformable PSRoI Pooling** - [x] **Deformable PSRoI Pooling**
...@@ -121,12 +128,14 @@ The following is the relationship between COCO mAP and FPS on Tesla V100 of repr ...@@ -121,12 +128,14 @@ The following is the relationship between COCO mAP and FPS on Tesla V100 of repr
## Model Zoo ## Model Zoo
- Pretrained models are available in the [PaddleDetection model zoo](docs/MODEL_ZOO.md). - Pretrained models are available in the [PaddleDetection model zoo](docs/MODEL_ZOO.md).
- [Face detection models](docs/featured_model/FACE_DETECTION_en.md) BlazeFace series model with the highest precision of 91.5% on Wider-Face dataset and outstanding inference performance.
- [Pretrained models for pedestrian and vehicle detection](docs/featured_model/CONTRIB.md) Models for object detection in specific scenarios.
- [YOLOv3 enhanced model](docs/featured_model/YOLOv3_ENHANCEMENT.md) Compared to MAP of 33.0% in paper, enhanced YOLOv3 reaches the MAP of 43.6% and inference speed is improved as well
- [Objects365 2019 Challenge champion model](docs/featured_model/CACascadeRCNN.md) One of the best single models in Objects365 Full Track of which MAP reaches 31.7%.
- [Open Images Dataset V5 and Objects365 Dataset models](docs/featured_model/OIDV5_BASELINE_MODEL.md)
- [Mobile models](configs/mobile/README.md) - [Mobile models](configs/mobile/README.md)
- [Anchor free models](configs/anchor_free/README.md)
- [Face detection models](docs/featured_model/FACE_DETECTION_en.md)
- [Pretrained models for pedestrian detection](docs/featured_model/CONTRIB.md)
- [Pretrained models for vehicle detection](docs/featured_model/CONTRIB.md)
- [YOLOv3 enhanced model](docs/featured_model/YOLOv3_ENHANCEMENT.md): Compared to MAP of 33.0% in paper, enhanced YOLOv3 reaches the MAP of 43.6%, and inference speed is improved as well
- [Objects365 2019 Challenge champion model](docs/featured_model/CACascadeRCNN.md)
- [Best single model of Open Images 2019-Object Detction](docs/featured_model/OIDV5_BASELINE_MODEL.md)
## License ## License
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
迁移学习为利用已有知识,对新知识进行学习。例如利用ImageNet分类预训练模型做初始化来训练检测模型,利用在COCO数据集上的检测模型做初始化来训练基于PascalVOC数据集的检测模型。 迁移学习为利用已有知识,对新知识进行学习。例如利用ImageNet分类预训练模型做初始化来训练检测模型,利用在COCO数据集上的检测模型做初始化来训练基于PascalVOC数据集的检测模型。
在进行迁移学习时,由于会使用不同的数据集,数据类别数与COCO/VOC数据类别不同,导致在加载PaddlePaddle开源模型时,与类别数相关的权重(例如分类模块的fc层)会出现维度不匹配的问题;另外,如果需要结构更加复杂的模型,需要对已有开源模型结构进行调整,对应权重也需要选择性加载。因此,需要检测库能够指定参数字段,在加载模型时不加载匹配的权重。 在进行迁移学习时,由于会使用不同的数据集,数据类别数与COCO/VOC数据类别不同,导致在加载开源模型(如COCO预训练模型)时,与类别数相关的权重(例如分类模块的fc层)会出现维度不匹配的问题;另外,如果需要结构更加复杂的模型,需要对已有开源模型结构进行调整,对应权重也需要选择性加载。因此,需要检测库能够指定参数字段,在加载模型时不加载匹配的权重。
## PaddleDetection进行迁移学习
在迁移学习中,对预训练模型进行选择性加载,PaddleDetection支持如下两种迁移学习方式: 在迁移学习中,对预训练模型进行选择性加载,支持如下两种迁移学习方式:
#### 直接加载预训练权重(**推荐方式**) #### 直接加载预训练权重(**推荐方式**)
...@@ -38,7 +37,7 @@ python -u tools/train.py -c configs/faster_rcnn_r50_1x.yml \ ...@@ -38,7 +37,7 @@ python -u tools/train.py -c configs/faster_rcnn_r50_1x.yml \
1. pretrain\_weights的路径为COCO数据集上开源的faster RCNN模型链接,完整模型链接可参考[MODEL_ZOO](../MODEL_ZOO_cn.md) 1. pretrain\_weights的路径为COCO数据集上开源的faster RCNN模型链接,完整模型链接可参考[MODEL_ZOO](../MODEL_ZOO_cn.md)
2. finetune\_exclude\_pretrained\_params中设置参数字段,如果参数名能够匹配以上参数字段(通配符匹配方式),则在模型加载时忽略该参数。 2. finetune\_exclude\_pretrained\_params中设置参数字段,如果参数名能够匹配以上参数字段(通配符匹配方式),则在模型加载时忽略该参数。
如果用户需要利用自己的数据进行finetune,模型结构不变,只需要忽略与类别数相关的参数。PaddleDetection给出了不同模型类型所对应的忽略参数字段。如下表所示:</br> 如果用户需要利用自己的数据进行finetune,模型结构不变,只需要忽略与类别数相关的参数,不同模型类型所对应的忽略参数字段如下表所示:</br>
| 模型类型 | 忽略参数字段 | | 模型类型 | 忽略参数字段 |
| :----------------: | :---------------------------------------: | | :----------------: | :---------------------------------------: |
......
...@@ -11,6 +11,8 @@ instructions](INSTALL.md). ...@@ -11,6 +11,8 @@ instructions](INSTALL.md).
PaddleDetection provides scripots for training, evalution and inference with various features according to different configure. PaddleDetection provides scripots for training, evalution and inference with various features according to different configure.
```bash ```bash
# set PYTHONPATH
export PYTHONPATH=$PYTHONPATH:.
# training in single-GPU and multi-GPU. specify different GPU numbers by CUDA_VISIBLE_DEVICES # training in single-GPU and multi-GPU. specify different GPU numbers by CUDA_VISIBLE_DEVICES
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python tools/train.py -c configs/faster_rcnn_r50_1x.yml python tools/train.py -c configs/faster_rcnn_r50_1x.yml
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
PaddleDetection提供了训练/评估/推断三个功能的使用脚本,支持通过不同可选参数实现特定功能 PaddleDetection提供了训练/评估/推断三个功能的使用脚本,支持通过不同可选参数实现特定功能
```bash ```bash
# 设置PYTHONPATH路径
export PYTHONPATH=$PYTHONPATH:.
# GPU训练 支持单卡,多卡训练,通过CUDA_VISIBLE_DEVICES指定卡号 # GPU训练 支持单卡,多卡训练,通过CUDA_VISIBLE_DEVICES指定卡号
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
python tools/train.py -c configs/faster_rcnn_r50_1x.yml python tools/train.py -c configs/faster_rcnn_r50_1x.yml
......
...@@ -16,11 +16,16 @@ from __future__ import absolute_import ...@@ -16,11 +16,16 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import numpy as np import numpy as np
from collections import OrderedDict from collections import OrderedDict
from paddleslim.dist.single_distiller import merge, l2_loss
from paddleslim.dist.single_distiller import merge, l2_loss
from paddle import fluid from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.data.reader import create_reader from ppdet.data.reader import create_reader
......
...@@ -16,7 +16,13 @@ from __future__ import absolute_import ...@@ -16,7 +16,13 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 4)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import numpy as np import numpy as np
from collections import OrderedDict from collections import OrderedDict
from paddleslim.dist.single_distiller import merge, l2_loss from paddleslim.dist.single_distiller import merge, l2_loss
......
...@@ -16,29 +16,19 @@ from __future__ import absolute_import ...@@ -16,29 +16,19 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import time import time
import numpy as np import numpy as np
import datetime import datetime
from collections import deque from collections import deque
def set_paddle_flags(**kwargs):
for key, value in kwargs.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
from paddle import fluid from paddle import fluid
import sys
sys.path.append("../../")
from ppdet.experimental import mixed_precision_context from ppdet.experimental import mixed_precision_context
from ppdet.core.workspace import load_config, merge_config, create, register from ppdet.core.workspace import load_config, merge_config, create, register
from ppdet.data.reader import create_reader from ppdet.data.reader import create_reader
......
...@@ -16,20 +16,12 @@ from __future__ import absolute_import ...@@ -16,20 +16,12 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
def set_paddle_flags(**kwargs): parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
for key, value in kwargs.items(): if parent_path not in sys.path:
if os.environ.get(key, None) is None: sys.path.append(parent_path)
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
import paddle.fluid as fluid import paddle.fluid as fluid
from paddleslim.prune import Pruner from paddleslim.prune import Pruner
......
...@@ -16,7 +16,11 @@ from __future__ import absolute_import ...@@ -16,7 +16,11 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
from paddle import fluid from paddle import fluid
......
...@@ -16,7 +16,13 @@ from __future__ import absolute_import ...@@ -16,7 +16,13 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import time import time
import numpy as np import numpy as np
import datetime import datetime
...@@ -24,6 +30,7 @@ from collections import deque ...@@ -24,6 +30,7 @@ from collections import deque
from paddleslim.prune import Pruner from paddleslim.prune import Pruner
from paddleslim.analysis import flops from paddleslim.analysis import flops
from paddle import fluid from paddle import fluid
from ppdet.experimental import mixed_precision_context from ppdet.experimental import mixed_precision_context
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.data.reader import create_reader from ppdet.data.reader import create_reader
......
...@@ -16,8 +16,12 @@ from __future__ import absolute_import ...@@ -16,8 +16,12 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import paddle.fluid as fluid import paddle.fluid as fluid
......
...@@ -16,8 +16,12 @@ from __future__ import absolute_import ...@@ -16,8 +16,12 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import sys # add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
from paddle import fluid from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
......
...@@ -16,17 +16,19 @@ from __future__ import absolute_import ...@@ -16,17 +16,19 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import glob # add python path of PadleDetection to sys.path
import sys parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import glob
import numpy as np import numpy as np
from PIL import Image from PIL import Image
from paddle import fluid from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.eval_utils import parse_fetches from ppdet.utils.eval_utils import parse_fetches
from ppdet.utils.cli import ArgsParser from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_gpu, check_version, check_config from ppdet.utils.check import check_gpu, check_version, check_config
......
...@@ -16,8 +16,12 @@ from __future__ import absolute_import ...@@ -16,8 +16,12 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import sys # add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import time import time
import numpy as np import numpy as np
import datetime import datetime
...@@ -28,7 +32,6 @@ from paddle import fluid ...@@ -28,7 +32,6 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.data.reader import create_reader from ppdet.data.reader import create_reader
from ppdet.utils import dist_utils from ppdet.utils import dist_utils
from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results
from ppdet.utils.stats import TrainingStats from ppdet.utils.stats import TrainingStats
......
...@@ -16,25 +16,17 @@ from __future__ import absolute_import ...@@ -16,25 +16,17 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import time import time
import numpy as np import numpy as np
import datetime import datetime
from collections import deque from collections import deque
def set_paddle_flags(**kwargs):
for key, value in kwargs.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
from paddle import fluid from paddle import fluid
from ppdet.experimental import mixed_precision_context from ppdet.experimental import mixed_precision_context
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
......
...@@ -16,26 +16,12 @@ from __future__ import absolute_import ...@@ -16,26 +16,12 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import sys
# add python path of PadleDetection to sys.path # add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if parent_path not in sys.path: if parent_path not in sys.path:
sys.path.append(parent_path) sys.path.append(parent_path)
def set_paddle_flags(**kwargs):
for key, value in kwargs.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
import paddle.fluid as fluid import paddle.fluid as fluid
from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results, json_eval_results from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results, json_eval_results
......
...@@ -16,30 +16,16 @@ from __future__ import absolute_import ...@@ -16,30 +16,16 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
import glob
import sys
# add python path of PadleDetection to sys.path # add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2))) parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if parent_path not in sys.path: if parent_path not in sys.path:
sys.path.append(parent_path) sys.path.append(parent_path)
import glob
import numpy as np import numpy as np
from PIL import Image from PIL import Image
def set_paddle_flags(**kwargs):
for key, value in kwargs.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
from paddle import fluid from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
......
...@@ -16,31 +16,18 @@ from __future__ import absolute_import ...@@ -16,31 +16,18 @@ from __future__ import absolute_import
from __future__ import division from __future__ import division
from __future__ import print_function from __future__ import print_function
import os import os, sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if parent_path not in sys.path:
sys.path.append(parent_path)
import time import time
import numpy as np import numpy as np
import random import random
import datetime import datetime
from collections import deque from collections import deque
from paddle.fluid import profiler from paddle.fluid import profiler
import sys
# add python path of PadleDetection to sys.path
parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 2)))
if parent_path not in sys.path:
sys.path.append(parent_path)
def set_paddle_flags(**kwargs):
for key, value in kwargs.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
# NOTE(paddle-dev): All of these flags should be set before
# `import paddle`. Otherwise, it would not take any effect.
set_paddle_flags(
FLAGS_eager_delete_tensor_gb=0, # enable GC to save memory
)
from paddle import fluid from paddle import fluid
from paddle.fluid.layers.learning_rate_scheduler import _decay_step_counter from paddle.fluid.layers.learning_rate_scheduler import _decay_step_counter
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册