|
21 | 21 | from scipy.ndimage import convolve1d, filters as sp_filters
|
22 | 22 | import os
|
23 | 23 | from nose_utils import assert_raises
|
| 24 | +from nose.plugins.attrib import attr |
24 | 25 |
|
25 | 26 | from test_utils import get_dali_extra_path, check_batch, RandomlyShapedDataIterator
|
26 | 27 |
|
@@ -194,6 +195,14 @@ def _test_vs_open_cv(device, batch_size, window_size, in_type, out_type, normali
|
194 | 195 |
|
195 | 196 |
|
196 | 197 | def test_vs_open_cv():
|
| 198 | + batch_size = 10 |
| 199 | + for device in ["cpu", "gpu"]: |
| 200 | + for window_size in range(1, 13, 2): |
| 201 | + yield _test_vs_open_cv, device, batch_size, window_size, types.UINT8, None, False, False |
| 202 | + |
| 203 | + |
| 204 | +@attr('slow') |
| 205 | +def test_vs_open_cv_slow(): |
197 | 206 | batch_size = 10
|
198 | 207 | for device in ["cpu", "gpu"]:
|
199 | 208 | for normalize in [True, False]:
|
@@ -431,7 +440,19 @@ def check_per_sample_laplacian(device, batch_size, window_dim, smoothing_dim, no
|
431 | 440 | def test_per_sample_laplacian():
|
432 | 441 | batch_size = 10
|
433 | 442 | for device in ["cpu", "gpu"]:
|
434 |
| - for in_type in [np.uint8, np.int16, np.int32, np.float32]: |
| 443 | + for in_type in [np.uint8]: |
| 444 | + for out_type in [None, np.float32]: |
| 445 | + for shape, layout, axes in shape_layout_axes_cases: |
| 446 | + for normalize in [True, False]: |
| 447 | + yield check_per_sample_laplacian, device, batch_size, 1, 1, \ |
| 448 | + normalize, shape, layout, axes, in_type, out_type |
| 449 | + |
| 450 | + |
| 451 | +@attr('slow') |
| 452 | +def test_per_sample_laplacian_slow(): |
| 453 | + batch_size = 10 |
| 454 | + for device in ["cpu", "gpu"]: |
| 455 | + for in_type in [np.int16, np.int32, np.float32]: |
435 | 456 | for out_type in [None, np.float32]:
|
436 | 457 | for shape, layout, axes in shape_layout_axes_cases:
|
437 | 458 | for window_dim in [None, 0, 1]:
|
@@ -490,6 +511,7 @@ def pipeline():
|
490 | 511 | max_allowed_error=max_error, expected_layout=layout)
|
491 | 512 |
|
492 | 513 |
|
| 514 | +@attr('slow') |
493 | 515 | def test_fixed_params_laplacian():
|
494 | 516 | batch_size = 10
|
495 | 517 | window_size_cases = {
|
|
0 commit comments