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

Commit

Permalink
Fix test for master
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelGlomski-Intel committed Apr 2, 2021
1 parent a1921ef commit 1eed11f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/python/mkl/test_mkldnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,20 +618,18 @@ def check_concat_training(stype):
for stype in stypes:
check_concat_training(stype)


@with_seed()
def test_concat_blocked():
ctx = mx.cpu()
axis = 1
filters = 32 # must be a power of 2 and >= 16
filters = 32 # must be a multiple of 16
kernel = (3, 3)
for in_dim_size in range(1, 17): # check cases with and without padding
in_shape = (1, in_dim_size, 64, 64)
in_data = mx.nd.random.uniform(-1, 1, in_shape, ctx=ctx)
conv_weights = mx.nd.random.uniform(-1, 1, (filters, in_shape[1], kernel[0], kernel[1]), ctx=ctx)

def calc_output_of_layer(layer):
ex = layer.simple_bind(ctx, x=in_shape)
ex = layer._simple_bind(ctx, x=in_shape)
in_data.copyto(ex.arg_arrays[0])
conv_weights.copyto(ex.arg_arrays[1])
return ex.forward()[0].asnumpy()
Expand All @@ -649,8 +647,6 @@ def calc_output_of_layer(layer):
out = calc_output_of_layer(conc)
assert_almost_equal(out, ref_out)


@with_seed()
def test_elemwise_add():
def ref_add(a, b):
return np.add(a, b)
Expand Down

0 comments on commit 1eed11f

Please sign in to comment.