File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
tensorflow_datasets/core/visualization Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 28
28
29
29
# Import for registration
30
30
from tensorflow_datasets .image_classification import imagenet # pylint: disable=unused-import,g-bad-import-order
31
-
31
+ from tensorflow_datasets .audio import crema_d
32
+ from tensorflow_datasets .core .visualization import image_visualizer
32
33
33
34
class ShowExamplesTest (testing .TestCase ):
34
-
35
35
@mock .patch ('matplotlib.pyplot.figure' )
36
- def test_show_examples (self , mock_fig ):
36
+ @mock .patch ('audio_visualizer.AudioGridVisualizer' )
37
+ def test_show_examples (self ,mock_fig ):
37
38
with testing .mock_data (num_examples = 20 ):
38
39
ds , ds_info = registered .load (
39
40
'imagenet2012' , split = 'train' , with_info = True )
40
- visualization .show_examples (ds_info , ds )
41
-
41
+ visualization .show_examples (ds_info , ds )
42
+
43
+ ds , ds_info = registered .load (
44
+ 'crema_d' , split = 'validation' , with_info = True )
45
+ visualization .show_examples (ds_info , ds )
46
+
42
47
# TODO(tfds): Should add test when there isn't enough examples (ds.take(3))
43
48
44
49
You can’t perform that action at this time.
0 commit comments