Skip to content

Commit 909727e

Browse files
committed
Modify unit tests
1 parent 36ccfb1 commit 909727e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/unit/algorithms/detection/adapters/mmdet/models/heads/test_custom_dino_head.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ def setup(self):
8585
@e2e_pytest_unit
8686
def test_forward_train(self):
8787
inputs = [
88-
torch.randn([2, 256, 92, 95]),
89-
torch.randn([2, 256, 46, 48]),
90-
torch.randn([2, 256, 23, 24]),
91-
torch.randn([2, 256, 12, 12]),
88+
torch.zeros([2, 256, 92, 95]),
89+
torch.zeros([2, 256, 46, 48]),
90+
torch.zeros([2, 256, 23, 24]),
91+
torch.zeros([2, 256, 12, 12]),
9292
]
9393
gt_bboxes = [
9494
torch.Tensor(
@@ -171,10 +171,10 @@ def test_forward_train(self):
171171
@e2e_pytest_unit
172172
def test_simple_test_bboxes(self):
173173
feats = [
174-
torch.randn([2, 256, 100, 134]),
175-
torch.randn([2, 256, 50, 67]),
176-
torch.randn([2, 256, 25, 34]),
177-
torch.randn([2, 256, 13, 17]),
174+
torch.zeros([2, 256, 100, 134]),
175+
torch.zeros([2, 256, 50, 67]),
176+
torch.zeros([2, 256, 25, 34]),
177+
torch.zeros([2, 256, 13, 17]),
178178
]
179179
img_metas = [
180180
{

0 commit comments

Comments
 (0)