提交 dea8eabb 编写于 作者: R root

fix

上级 4ccfca29
......@@ -46,9 +46,10 @@ TRAIN:
channel_first: False
- RandCropImage:
size: 224
interpolation: 2
- RandFlipImage:
flip_code: 1
- AA:
- AutoArgument:
- NormalizeImage:
scale: 1./255.
mean: [0.485, 0.456, 0.406]
......
......@@ -172,7 +172,7 @@ class RandFlipImage(object):
else:
return img
class AA(object):
class AutoArgument(object):
def __init__(self):
self.policy = ImageNetPolicy()
......
......@@ -23,6 +23,12 @@ import shutil
import sys
def main():
"""
Usage: when training with flag use_ema, and evaluating EMA model, should clean the saved model at first.
To generate clean model:
python ema_clean.py ema_model_dir cleaned_model_dir
"""
cleaned_model_dir = sys.argv[1]
ema_model_dir = sys.argv[2]
if not os.path.exists(cleaned_model_dir):
......
......@@ -36,6 +36,8 @@ from ppcls.utils import logger
from paddle.fluid.incubate.fleet.collective import fleet
from paddle.fluid.incubate.fleet.collective import DistributedStrategy
import ema
def create_feeds(image_shape, use_mix=None):
"""
......@@ -102,7 +104,6 @@ def create_model(architecture, image, classes_num, is_train):
name = architecture["name"]
params = architecture.get("params", {})
params['is_test'] = not is_train
print(params)
model = architectures.__dict__[name](**params)
out = model.net(input=image, class_dim=classes_num)
return out
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册