Skip to content

Commit 26fd132

Browse files
committed
fix unittest
1 parent 6beb5c4 commit 26fd132

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
22
import torch
33

4-
from mmseg.models.decode_heads import FCNHead, ISAHead
4+
from mmseg.models.decode_heads import ISAHead
55
from .utils import to_cuda
66

77

@@ -14,10 +14,7 @@ def test_isa_head():
1414
num_classes=19,
1515
isa_channels=16,
1616
down_factor=(8, 8))
17-
fcn_head = FCNHead(in_channels=32, channels=16, num_classes=19)
1817
if torch.cuda.is_available():
19-
head, inputs = to_cuda(isa_head, inputs)
20-
head, inputs = to_cuda(fcn_head, inputs)
21-
prev_output = fcn_head(inputs)
22-
output = isa_head(inputs, prev_output)
18+
isa_head, inputs = to_cuda(isa_head, inputs)
19+
output = isa_head(inputs)
2320
assert output.shape == (1, isa_head.num_classes, 45, 45)

0 commit comments

Comments
 (0)