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 Embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgoggins committed Feb 24, 2020
1 parent a645cfc commit af9c607
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/nightly/test_large_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,18 @@ def npy_instance_norm(data, gamma, beta, axis, eps=1E-5):
assert_almost_equal(out, out_nd.asnumpy(), forward_check_eps,
forward_check_eps)

def check_embedding():
data = nd.random_normal(shape=(2**32, 1))
weight = nd.random_normal(shape=(2**32, 1))
input_dim = 2**32
output_dim = 1

out = nd.Embedding(data=data, weight=weight, input_dim=input_dim, output_dim=output_dim)

assert out.shape[0] == 4294967296
assert out.shape[1] == 1
assert out.shape[2] == 1

check_gluon_embedding()
check_fully_connected()
check_dense()
Expand All @@ -474,6 +486,7 @@ def npy_instance_norm(data, gamma, beta, axis, eps=1E-5):
check_linear_and_logistic_regression()
check_l2_normalization()
check_instance_norm()
check_embedding()


def test_tensor():
Expand Down

0 comments on commit af9c607

Please sign in to comment.