From eb44ed02253adc63b5852fde1cf4f436ddf168cb Mon Sep 17 00:00:00 2001 From: chenguowei01 Date: Tue, 18 Aug 2020 13:05:29 +0800 Subject: [PATCH] update import format --- dygraph/benchmark/deeplabv3p.py | 10 +++++----- dygraph/benchmark/hrnet.py | 10 +++++----- dygraph/core/infer.py | 4 ++-- dygraph/core/train.py | 8 ++++---- dygraph/core/val.py | 6 +++--- dygraph/datasets/ade.py | 2 +- dygraph/datasets/optic_disc_seg.py | 2 +- dygraph/datasets/voc.py | 2 +- dygraph/infer.py | 10 +++++----- dygraph/tools/voc_augment.py | 2 +- dygraph/train.py | 10 +++++----- dygraph/val.py | 10 +++++----- 12 files changed, 38 insertions(+), 38 deletions(-) diff --git a/dygraph/benchmark/deeplabv3p.py b/dygraph/benchmark/deeplabv3p.py index 2eb05644..9c1bc66c 100644 --- a/dygraph/benchmark/deeplabv3p.py +++ b/dygraph/benchmark/deeplabv3p.py @@ -17,11 +17,11 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -from datasets import DATASETS -import transforms as T -from models import MODELS -from utils import get_environ_info -from core import train +from dygraph.datasets import DATASETS +import dygraph.transforms as T +from dygraph.models import MODELS +from dygraph.utils import get_environ_info +from dygraph.core import train def parse_args(): diff --git a/dygraph/benchmark/hrnet.py b/dygraph/benchmark/hrnet.py index 21990011..3f64aa79 100644 --- a/dygraph/benchmark/hrnet.py +++ b/dygraph/benchmark/hrnet.py @@ -17,11 +17,11 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -from datasets import DATASETS -import transforms as T -from models import MODELS -from utils import get_environ_info -from core import train +from dygraph.datasets import DATASETS +import dygraph.transforms as T +from dygraph.models import MODELS +from dygraph.utils import get_environ_info +from dygraph.core import train def parse_args(): diff --git a/dygraph/core/infer.py b/dygraph/core/infer.py index fa390625..23890e8e 100644 --- a/dygraph/core/infer.py +++ b/dygraph/core/infer.py @@ -20,8 +20,8 @@ import paddle.fluid as fluid import cv2 import tqdm -import utils -import utils.logging as logging +from dygraph import utils +import dygraph.utils.logging as logging def mkdir(path): diff --git a/dygraph/core/train.py b/dygraph/core/train.py index 7e84d204..a823265f 100644 --- a/dygraph/core/train.py +++ b/dygraph/core/train.py @@ -19,10 +19,10 @@ from paddle.fluid.dygraph.parallel import ParallelEnv from paddle.fluid.io import DataLoader from paddle.incubate.hapi.distributed import DistributedBatchSampler -import utils.logging as logging -from utils import load_pretrained_model -from utils import resume -from utils import Timer, calculate_eta +import dygraph.utils.logging as logging +from dygraph.utils import load_pretrained_model +from dygraph.utils import resume +from dygraph.utils import Timer, calculate_eta from .val import evaluate diff --git a/dygraph/core/val.py b/dygraph/core/val.py index 3245be5a..0623b617 100644 --- a/dygraph/core/val.py +++ b/dygraph/core/val.py @@ -20,9 +20,9 @@ import cv2 from paddle.fluid.dygraph.base import to_variable import paddle.fluid as fluid -import utils.logging as logging -from utils import ConfusionMatrix -from utils import Timer, calculate_eta +import dygraph.utils.logging as logging +from dygraph.utils import ConfusionMatrix +from dygraph.utils import Timer, calculate_eta def evaluate(model, diff --git a/dygraph/datasets/ade.py b/dygraph/datasets/ade.py index def88a51..1c9065e3 100644 --- a/dygraph/datasets/ade.py +++ b/dygraph/datasets/ade.py @@ -18,7 +18,7 @@ import numpy as np from PIL import Image from .dataset import Dataset -from utils.download import download_file_and_uncompress +from dygraph.utils.download import download_file_and_uncompress DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset') URL = "http://data.csail.mit.edu/places/ADEchallenge/ADEChallengeData2016.zip" diff --git a/dygraph/datasets/optic_disc_seg.py b/dygraph/datasets/optic_disc_seg.py index a59ac847..82d18e8c 100644 --- a/dygraph/datasets/optic_disc_seg.py +++ b/dygraph/datasets/optic_disc_seg.py @@ -15,7 +15,7 @@ import os from .dataset import Dataset -from utils.download import download_file_and_uncompress +from dygraph.utils.download import download_file_and_uncompress DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset') URL = "https://paddleseg.bj.bcebos.com/dataset/optic_disc_seg.zip" diff --git a/dygraph/datasets/voc.py b/dygraph/datasets/voc.py index ceb33b9a..d11f4c9e 100644 --- a/dygraph/datasets/voc.py +++ b/dygraph/datasets/voc.py @@ -14,7 +14,7 @@ import os from .dataset import Dataset -from utils.download import download_file_and_uncompress +from dygraph.utils.download import download_file_and_uncompress DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset') URL = "http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar" diff --git a/dygraph/infer.py b/dygraph/infer.py index 8111ff01..76cdee7c 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 datasets import DATASETS -import transforms as T -from models import MODELS -from utils import get_environ_info -from core import infer +from dygraph.datasets import DATASETS +import dygraph.transforms as T +from dygraph.models import MODELS +from dygraph.utils import get_environ_info +from dygraph.core import infer def parse_args(): diff --git a/dygraph/tools/voc_augment.py b/dygraph/tools/voc_augment.py index c4be6ad4..b86f99bf 100644 --- a/dygraph/tools/voc_augment.py +++ b/dygraph/tools/voc_augment.py @@ -27,7 +27,7 @@ import numpy as np from scipy.io import loadmat import tqdm -from utils.download import download_file_and_uncompress +from dygraph.utils.download import download_file_and_uncompress DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset') URL = 'http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz' diff --git a/dygraph/train.py b/dygraph/train.py index 8cd97965..5a66f607 100644 --- a/dygraph/train.py +++ b/dygraph/train.py @@ -17,11 +17,11 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -from datasets import DATASETS -import transforms as T -from models import MODELS -from utils import get_environ_info -from core import train +from dygraph.datasets import DATASETS +import dygraph.transforms as T +from dygraph.models import MODELS +from dygraph.utils import get_environ_info +from dygraph.core import train def parse_args(): diff --git a/dygraph/val.py b/dygraph/val.py index d388fccf..9550cc83 100644 --- a/dygraph/val.py +++ b/dygraph/val.py @@ -17,11 +17,11 @@ import argparse import paddle.fluid as fluid from paddle.fluid.dygraph.parallel import ParallelEnv -from datasets import DATASETS -import transforms as T -from models import MODELS -from utils import get_environ_info -from core import evaluate +from dygraph.datasets import DATASETS +import dygraph.transforms as T +from dygraph.models import MODELS +from dygraph.utils import get_environ_info +from dygraph.core import evaluate def parse_args(): -- GitLab