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

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Apr 5, 2019
1 parent 1e4fd4c commit 916a4e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/python/unittest/test_gluon_data_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_to_tensor():
out_nd = transforms.ToTensor()(nd.array(data_in, dtype='uint8'))
assert_almost_equal(out_nd.asnumpy(), np.transpose(
data_in.astype(dtype=np.float32) / 255.0, (0, 3, 1, 2)))

# Invalid Input
invalid_data_in = nd.random.uniform(0, 255, (5, 5, 300, 300, 3)).astype(dtype=np.uint8)
transformer = transforms.ToTensor()
Expand Down Expand Up @@ -117,7 +117,7 @@ def _test_resize_with_diff_type(dtype):
assertRaises(MXNetError, invalid_transform, data_in)

for dtype in ['uint8', 'float32', 'float64']:
_test_resize_with_diff_type(dtype)
_test_resize_with_diff_type(dtype)


@with_seed()
Expand Down Expand Up @@ -149,7 +149,7 @@ def _test_crop_resize_with_diff_type(dtype):
# test with resize height and width should be greater than 0
transformer = transforms.CropResize(0, 0, 100, 50, (-25, 25), 2)
assertRaises(MXNetError, transformer, data_in)
# test height and width should be greater than 0
# test height and width should be greater than 0
transformer = transforms.CropResize(0, 0, -100, -50)
assertRaises(MXNetError, transformer, data_in)
# test cropped area is bigger than input data
Expand All @@ -158,7 +158,7 @@ def _test_crop_resize_with_diff_type(dtype):
assertRaises(MXNetError, transformer, data_bath_in)

for dtype in ['uint8', 'float32', 'float64']:
_test_crop_resize_with_diff_type(dtype)
_test_crop_resize_with_diff_type(dtype)

# test nd.image.crop backward
def test_crop_backward(test_nd_arr, TestCase):
Expand All @@ -179,7 +179,7 @@ def test_crop_backward(test_nd_arr, TestCase):
data_in = nd.arange(60).reshape((5, 4, 3)).astype(dtype)
for test_case in test_list:
test_crop_backward(data_in, test_case)



# check numeric gradient of nd.image.crop
Expand Down

0 comments on commit 916a4e3

Please sign in to comment.