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

Fix record io augmentation speed #11474

Merged
merged 1 commit into from
Jun 29, 2018
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
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