Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Rebase #13757 to master #15189

Merged
merged 6 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion example/image-classification/common/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def add_fit_args(parser):
train.add_argument('--profile-server-suffix', type=str, default='',
help='profile server actions into a file with name like rank1_ followed by this suffix \
during distributed training')
train.add_argument('--use-imagenet-data-augmentation', type=int, default=0,
help='enable data augmentation of ImageNet data, default disabled')
return train


Expand Down Expand Up @@ -335,4 +337,4 @@ def fit(args, network, data_loader, **kwargs):
if args.profile_server_suffix:
mx.profiler.set_state(state='run', profile_process='server')
if args.profile_worker_suffix:
mx.profiler.set_state(state='run', profile_process='worker')
mx.profiler.set_state(state='run', profile_process='worker')
4 changes: 2 additions & 2 deletions example/image-classification/train_imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def set_imagenet_aug(aug):
fit.add_fit_args(parser)
data.add_data_args(parser)
data.add_data_aug_args(parser)
# uncomment to set standard augmentations for imagenet training
# set_imagenet_aug(parser)
parser.set_defaults(
# network
network = 'resnet',
Expand All @@ -56,6 +54,8 @@ def set_imagenet_aug(aug):
dtype = 'float32'
)
args = parser.parse_args()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should rearrange line 56-58? It looks like set_imagenet_aug() does nothing on args.

if args.use_imagenet_data_augmentation:
set_imagenet_aug(parser)

# load network
from importlib import import_module
Expand Down