Spaces:
Sleeping
Sleeping
File size: 388 Bytes
67f4974 b41850c 67f4974 b41850c 67f4974 b41850c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
"""
Testing Detection utility functions
"""
import torch
from detection import ml_utils
# Test dictionary conversion
def test_convert_tensor_dict_to_json():
"""Testing tensor to dict conversions"""
my_dict = {"scores": torch.tensor([1, 2, 3])}
my_list_gt = {"scores": [1, 2, 3]}
my_list = ml_utils.convert_tensor_dict_to_json(my_dict)
assert my_list == my_list_gt
|