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

Commit

Permalink
fix record io augmentation speed (#11474)
Browse files Browse the repository at this point in the history
  • Loading branch information
hetong007 authored and szha committed Jun 29, 2018
1 parent 36f2aae commit b344d89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/image-classification/common/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def add_data_aug_args(parser):

def set_resnet_aug(aug):
# standard data augmentation setting for resnet training
aug.set_defaults(random_crop=1, random_resized_crop=1)
aug.set_defaults(random_crop=0, random_resized_crop=1)
aug.set_defaults(min_random_area=0.08)
aug.set_defaults(max_random_aspect_ratio=4./3., min_random_aspect_ratio=3./4.)
aug.set_defaults(brightness=0.4, contrast=0.4, saturation=0.4, pca_noise=0.1)
Expand Down
2 changes: 1 addition & 1 deletion src/io/image_aug_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class DefaultImageAugmenter : public ImageAugmenter {
if (param_.max_rotate_angle > 0 || param_.max_shear_ratio > 0.0f
|| param_.rotate > 0 || rotate_list_.size() > 0
|| param_.max_random_scale != 1.0f || param_.min_random_scale != 1.0
|| min_aspect_ratio != 1.0f || max_aspect_ratio != 1.0f
|| (!param_.random_resized_crop && (min_aspect_ratio != 1.0f || max_aspect_ratio != 1.0f))
|| param_.max_img_size != 1e10f || param_.min_img_size != 0.0f) {
std::uniform_real_distribution<float> rand_uniform(0, 1);
// shear
Expand Down

0 comments on commit b344d89

Please sign in to comment.