提交 3974cb82 编写于 作者: D dengkaipeng

remove Compose in tsm/transforms

上级 d9520c24
......@@ -20,6 +20,7 @@ import argparse
import numpy as np
from hapi.model import Input, set_device
from hapi.vision.transforms import Compose
from check import check_gpu, check_version
from modeling import tsm_resnet50
......
......@@ -24,6 +24,7 @@ from paddle.fluid.dygraph.parallel import ParallelEnv
from hapi.model import Model, CrossEntropy, Input, set_device
from hapi.metrics import Accuracy
from hapi.vision.transforms import Compose
from modeling import tsm_resnet50
from check import check_gpu, check_version
......
......@@ -21,24 +21,7 @@ import logging
logger = logging.getLogger(__name__)
__all__ = ['GroupScale', 'GroupMultiScaleCrop', 'GroupRandomCrop',
'GroupRandomFlip', 'GroupCenterCrop', 'NormalizeImage',
'Compose']
class Compose(object):
def __init__(self, transforms=[]):
self.transforms = transforms
def __call__(self, *data):
for f in self.transforms:
try:
data = f(*data)
except Exception as e:
stack_info = traceback.format_exc()
logger.info("fail to perform transform [{}] with error: "
"{} and stack:\n{}".format(f, e, str(stack_info)))
raise e
return data
'GroupRandomFlip', 'GroupCenterCrop', 'NormalizeImage']
class GroupScale(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册