Skip to content

Commit

Permalink
fix: padding value in data.functional.
Browse files Browse the repository at this point in the history
  • Loading branch information
0h-n0 committed Feb 11, 2019
1 parent ce17d1c commit 880cf31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchex/data/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def pad_random_sift(img, canvas_size, fill=0):
_x = np.random.choice(origin_range[0])
_y = np.random.choice(origin_range[1])

pad_top = _y - 1
pad_top = _y
pad_bottom = canvas_size[1] - (H + pad_top)
pad_left = _x - 1
pad_left = _x
pad_right = canvas_size[0] - (W + pad_left)

if img.mode == 'P':
Expand Down

0 comments on commit 880cf31

Please sign in to comment.