diff --git a/src/deepsparse/utils/data.py b/src/deepsparse/utils/data.py index df08fb5e0c..a8d463f7b9 100644 --- a/src/deepsparse/utils/data.py +++ b/src/deepsparse/utils/data.py @@ -101,7 +101,7 @@ def verify_outputs( raise Exception( f"Output shapes don't match, {output.shape} != {gt_output.shape}" ) - if type(output) != type(gt_output): + if type(output) is not type(gt_output): raise Exception( f"Output types don't match, {type(output)} != {type(gt_output)}" ) diff --git a/tests/deepsparse/pipelines/test_dynamic_batch_pipeline.py b/tests/deepsparse/pipelines/test_dynamic_batch_pipeline.py index 1d08fd9832..77f451da81 100644 --- a/tests/deepsparse/pipelines/test_dynamic_batch_pipeline.py +++ b/tests/deepsparse/pipelines/test_dynamic_batch_pipeline.py @@ -35,7 +35,7 @@ def compare(expected, actual): - assert type(expected) == type(actual) + assert type(expected) is type(actual) if isinstance(expected, (list, float, numpy.ndarray)): expected_np = numpy.asarray(expected, dtype=float)