refactor local test
@@ -12,17 +12,8 @@ def test_locallyconnected_1d():
input_dim = 5
filter_length = 3
filters = 4
-
- for padding in ['valid']:
- for strides in [1]:
- if padding == 'same' and strides != 1:
- continue
- layer_test(local.LocallyConnected1D,
- kwargs={'filters': filters,
- 'kernel_size': filter_length,
- 'padding': padding,
- 'strides': strides},
- input_shape=(num_samples, num_steps, input_dim))
+ padding = 'valid'
+ strides = 1
layer_test(local.LocallyConnected1D,
kwargs={'filters': filters,
@@ -37,17 +28,14 @@ def test_locallyconnected_1d():
@keras_test
def test_locallyconnected_2d():
- num_samples = 8
+ num_samples = 5
filters = 3
stack_size = 4
num_row = 6
- num_col = 10
+ num_col = 8
+ padding = 'valid'
- for padding in ['valid']:
for strides in [(1, 1), (2, 2)]:
- if padding == 'same' and strides != (1, 1):
- continue
-
layer_test(local.LocallyConnected2D,
kwargs={'filters': filters,
'kernel_size': 3,
