Skip to content

Commit a803d0c

Browse files
authored
Merge pull request #1 from naeem-md93/naeem-md93-patch-1
Update roi_heads.py
2 parents 111aafb + eee83f7 commit a803d0c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

torchvision/models/detection/roi_heads.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -826,11 +826,7 @@ def forward(
826826

827827
# keep none checks in if conditional so torchscript will conditionally
828828
# compile each branch
829-
if (
830-
self.keypoint_roi_pool is not None
831-
and self.keypoint_head is not None
832-
and self.keypoint_predictor is not None
833-
):
829+
if self.has_keypoint():
834830
keypoint_proposals = [p["boxes"] for p in result]
835831
if self.training:
836832
# during training, only focus on positive boxes

0 commit comments

Comments
 (0)