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

Commit

Permalink
Added nightly test for SpatialTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgoggins committed Feb 24, 2020
1 parent 715a0ed commit 50d1530
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/nightly/test_large_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,21 @@ def check_col2im():
assert res.shape[2] == 2
assert res.shape[3] == 2
assert res.shape[4] == 1

def check_spatial_transformer():
data = nd.random_normal(shape=(2, 2**29, 1, 6))
loc = nd.random_normal(shape=(2, 6))
transform_type = 'affine'
sampler_type = 'bilinear'
target_shape = (2, 6)

res = nd.SpatialTransformer(data=data, loc=loc, transform_type=transform_type,
sampler_type=sampler_type, target_shape=target_shape)

assert res.shape[0] == 2
assert res.shape[1] == 536870912
assert res.shape[2] == 2
assert res.shape[3] == 6

check_gluon_embedding()
check_fully_connected()
Expand All @@ -488,6 +503,7 @@ def check_col2im():
check_l2_normalization()
check_instance_norm()
check_col2im()
check_spatial_transformer()


def test_tensor():
Expand Down

0 comments on commit 50d1530

Please sign in to comment.