From ff632c61e2642d8bd34385498b81155d74188d23 Mon Sep 17 00:00:00 2001 From: huangjun12 <12272008@bjtu.edu.cn> Date: Thu, 3 Sep 2020 12:44:12 +0000 Subject: [PATCH] fix slowfast interface bug caused by the movement of hapi dir --- 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 985a8eca07..1c229d6bcb 100644 --- a/dygraph/slowfast/eval.py +++ b/dygraph/slowfast/eval.py @@ -20,8 +20,8 @@ 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 04ad7f0cee..1a1c8b84d5 100644 --- a/dygraph/slowfast/predict.py +++ b/dygraph/slowfast/predict.py @@ -21,8 +21,8 @@ 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 0a8176590f..48dabcf4b4 100644 --- a/dygraph/slowfast/train.py +++ b/dygraph/slowfast/train.py @@ -24,8 +24,7 @@ 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 *