Channel order transpose, for image embedder. Updated unit test. (#87)

This commit is contained in:
Thom Lane authored and Gal Novik committed 2018-11-19 15:39:03 +02:00
1 parent ff816b347d
commit 7ba1a4393f
2 files changed
+4 -4

No files matched your search

@@ -15,7 +15,8 @@ def test_image_embedder():
params = InputEmbedderParameters(scheme=EmbedderScheme.Medium)
emb = ImageEmbedder(params=params)
emb.initialize()
input_data = mx.nd.random.uniform(low=0, high=1, shape=(10, 3, 244, 244))
# input is NHWC, and not MXNet default NCHW
input_data = mx.nd.random.uniform(low=0, high=1, shape=(10, 244, 244, 3))
output = emb(input_data)
assert len(output.shape) == 2 # since last block was flatten
assert output.shape[0] == 10 # since batch_size is 10