Skip to content

Commit

Permalink
minor fixes for training, fix float/double initializer in mxnet
Browse files Browse the repository at this point in the history
  • Loading branch information
zhreshold committed Nov 16, 2016
1 parent 09cf204 commit acce1cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.3),
RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.5),
RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.7),
RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.9),
RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=1.0)]
RandPadder(max_scale=2., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05),
RandPadder(max_scale=3., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05),
RandPadder(max_scale=4., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05),]
# cfg.TRAIN.RAND_SAMPLERS = []
cfg.TRAIN.RAND_MIRROR = True
cfg.TRAIN.INIT_SHUFFLE = True
Expand All @@ -25,7 +26,7 @@
# validation
cfg.VALID = edict()
cfg.VALID.RAND_SAMPLERS = []
cfg.VALID.RAND_MIRROR = True
cfg.VALID.INIT_SHUFFLE = True
cfg.VALID.EPOCH_SHUFFLE = True
cfg.VALID.RAND_MIRROR = False
cfg.VALID.INIT_SHUFFLE = False
cfg.VALID.EPOCH_SHUFFLE = False
cfg.VALID.RAND_SEED = None
2 changes: 1 addition & 1 deletion dataset/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _data_augmentation(self, data, label):
offset_x = 0 - xmin
offset_y = 0 - ymin
data_bak = data
data = np.full((new_height, new_width, 3), 255)
data = np.full((new_height, new_width, 3), 128.)
data[offset_y:offset_y+height, offset_x:offset_x + width, :] = data_bak
label = rand_crops[index][1]

Expand Down
2 changes: 1 addition & 1 deletion mxnet

0 comments on commit acce1cf

Please sign in to comment.