Skip to content

Commit

Permalink
[Fix] Fix nuscenes_mono_dataset unit test due to hack fix (#795)
Browse files Browse the repository at this point in the history
* Fix nuscenes_mono_dataset unit test due to hack fix

* Remove unused codes
  • Loading branch information
Tai-Wang authored Jul 28, 2021
1 parent 7796487 commit a56185a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/test_data/test_datasets/test_nuscenes_mono_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,8 @@ def test_format_results():
expected_token = 'e93e98b63d3b40209056d129dc53ceee'
expected_trans = torch.tensor(
[1018.753821915645, 605.190386124652, 0.7266818822266328])
expected_size = torch.tensor([1.6380000114440918, 4.25, 1.440000057220459])
expected_rotation = torch.tensor([
-0.9924980733795628, -0.013604682549109839, 0.01027292674776989,
-0.12106590736714223
])
expected_size = torch.tensor([1.440000057220459, 1.6380000114440918, 4.25])
expected_rotation = torch.tensor([-0.5717, -0.0014, 0.0170, -0.8203])
expected_detname = 'car'
expected_attr = 'vehicle.moving'

Expand All @@ -148,7 +145,7 @@ def test_format_results():
torch.tensor(det['translation']), expected_trans, 1e-5)
assert torch.allclose(torch.tensor(det['size']), expected_size, 1e-5)
assert torch.allclose(
torch.tensor(det['rotation']), expected_rotation, 1e-5)
torch.tensor(det['rotation']), expected_rotation, atol=1e-4)
assert det['detection_name'] == expected_detname
assert det['attribute_name'] == expected_attr

Expand Down

0 comments on commit a56185a

Please sign in to comment.