12 lines
558 B
Python
12 lines
558 B
Python
from image_prediction.label_mapper.mappers.numeric import IndexLabelMapper
|
|
|
|
|
|
def test_index_label_mapper(batch_of_expected_numeric_labels, batch_of_expected_string_labels, classes):
|
|
mapper = IndexLabelMapper(classes)
|
|
assert list(mapper(batch_of_expected_numeric_labels)) == batch_of_expected_string_labels
|
|
|
|
|
|
# def test_array_label_mapper(expected_batch_array, batch_of_expected_label_to_probability_mappings, classes):
|
|
# mapper = ProbabilityMapper(classes)
|
|
# assert list(mapper(expected_batch_numeric_labels)) == expected_batch_string_labels
|