From e55fd7590c0c27d8f8a8856d7e0f946c7e3dead0 Mon Sep 17 00:00:00 2001 From: michaelowenliu Date: Fri, 11 Sep 2020 14:50:12 +0800 Subject: [PATCH] change dygraph to paddleseg api --- dygraph/infer.py | 10 +++++----- dygraph/paddleseg/core/infer.py | 4 ++-- dygraph/paddleseg/core/train.py | 8 ++++---- dygraph/paddleseg/core/val.py | 6 +++--- dygraph/train.py | 10 ++++------ dygraph/val.py | 9 ++++----- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/dygraph/infer.py b/dygraph/infer.py index 2e6aa3f5..a9c0d380 100644 --- a/dygraph/infer.py +++ b/dygraph/infer.py @@ -17,11 +17,11 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -from dygraph.datasets import DATASETS -import dygraph.transforms as T -from dygraph.cvlibs import manager -from dygraph.utils import get_environ_info -from dygraph.core import infer +from paddleseg.datasets import DATASETS +import paddleseg.transforms as T +from paddleseg.cvlibs import manager +from paddleseg.utils import get_environ_info +from paddleseg.core import infer def parse_args(): diff --git a/dygraph/paddleseg/core/infer.py b/dygraph/paddleseg/core/infer.py index 499890d2..a9e671e0 100644 --- a/dygraph/paddleseg/core/infer.py +++ b/dygraph/paddleseg/core/infer.py @@ -20,8 +20,8 @@ import paddle.fluid as fluid import cv2 import tqdm -from dygraph import utils -import dygraph.utils.logger as logger +from paddleseg import utils +import paddleseg.utils.logger as logger def mkdir(path): diff --git a/dygraph/paddleseg/core/train.py b/dygraph/paddleseg/core/train.py index ddb58a6b..a2621a62 100644 --- a/dygraph/paddleseg/core/train.py +++ b/dygraph/paddleseg/core/train.py @@ -22,10 +22,10 @@ from paddle.fluid.io import DataLoader from paddle.io import DistributedBatchSampler import paddle.nn.functional as F -import dygraph.utils.logger as logger -from dygraph.utils import load_pretrained_model -from dygraph.utils import resume -from dygraph.utils import Timer, calculate_eta +import paddleseg.utils.logger as logger +from paddleseg.utils import load_pretrained_model +from paddleseg.utils import resume +from paddleseg.utils import Timer, calculate_eta from .val import evaluate diff --git a/dygraph/paddleseg/core/val.py b/dygraph/paddleseg/core/val.py index 22e84a31..c104b2d8 100644 --- a/dygraph/paddleseg/core/val.py +++ b/dygraph/paddleseg/core/val.py @@ -22,9 +22,9 @@ import paddle.fluid as fluid import paddle.nn.functional as F import paddle -import dygraph.utils.logger as logger -from dygraph.utils import ConfusionMatrix -from dygraph.utils import Timer, calculate_eta +import paddleseg.utils.logger as logger +from paddleseg.utils import ConfusionMatrix +from paddleseg.utils import Timer, calculate_eta def evaluate(model, diff --git a/dygraph/train.py b/dygraph/train.py index 789cdf45..1e56fce7 100644 --- a/dygraph/train.py +++ b/dygraph/train.py @@ -17,12 +17,10 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -import dygraph -from dygraph.cvlibs import manager -from dygraph.utils import get_environ_info -from dygraph.utils import logger -from dygraph.utils import Config -from dygraph.core import train +import paddleseg +from paddleseg.cvlibs import manager +from paddleseg.utils import get_environ_info, logger, Config +from paddleseg.core import train def parse_args(): diff --git a/dygraph/val.py b/dygraph/val.py index f4b7d639..6dcf0407 100644 --- a/dygraph/val.py +++ b/dygraph/val.py @@ -17,11 +17,10 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -import dygraph -from dygraph.cvlibs import manager -from dygraph.utils import get_environ_info -from dygraph.utils import Config -from dygraph.core import evaluate +import paddleseg +from paddleseg.cvlibs import manager +from paddleseg.utils import get_environ_info, Config +from paddleseg.core import evaluate def parse_args(): -- GitLab