From 22cf38374a68f7360d9606063b0c3c681b3a9279 Mon Sep 17 00:00:00 2001 From: huangjun12 <2399845970@qq.com> Date: Mon, 14 Sep 2020 17:37:32 +0800 Subject: [PATCH] fix slowfast interface bug caused by the movement of hapi dir (#4834) --- dygraph/slowfast/eval.py | 4 ++-- dygraph/slowfast/predict.py | 4 ++-- dygraph/slowfast/train.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dygraph/slowfast/eval.py b/dygraph/slowfast/eval.py index 985a8eca..1c229d6b 100644 --- a/dygraph/slowfast/eval.py +++ b/dygraph/slowfast/eval.py @@ -20,8 +20,8 @@ import logging import numpy as np import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable -from paddle.io import DataLoader, Dataset -from paddle.incubate.hapi.distributed import DistributedBatchSampler, _all_gather +from paddle.io import DataLoader, Dataset, DistributedBatchSampler +from paddle.hapi.model import _all_gather from paddle.fluid.dygraph.parallel import ParallelEnv from model import * diff --git a/dygraph/slowfast/predict.py b/dygraph/slowfast/predict.py index 04ad7f0c..1a1c8b84 100644 --- a/dygraph/slowfast/predict.py +++ b/dygraph/slowfast/predict.py @@ -21,8 +21,8 @@ import numpy as np import json import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable -from paddle.io import DataLoader, Dataset -from paddle.incubate.hapi.distributed import DistributedBatchSampler, _all_gather +from paddle.io import DataLoader, Dataset, DistributedBatchSampler +from paddle.hapi.model import _all_gather from paddle.fluid.dygraph.parallel import ParallelEnv from model import * diff --git a/dygraph/slowfast/train.py b/dygraph/slowfast/train.py index 0a817659..48dabcf4 100644 --- a/dygraph/slowfast/train.py +++ b/dygraph/slowfast/train.py @@ -24,8 +24,7 @@ import random import paddle import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable -from paddle.io import DataLoader, Dataset -from paddle.incubate.hapi.distributed import DistributedBatchSampler +from paddle.io import DataLoader, Dataset, DistributedBatchSampler from model import * from config_utils import * -- GitLab