Skip to content

Commit 7fa267e

Browse files
kazhangdatumbox
andauthored
add logging for LRASPP, FCN, DeepPLabV3 (#4956)
Co-authored-by: Vasilis Vryniotis <[email protected]>
1 parent 5e0959a commit 7fa267e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

torchvision/models/segmentation/_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
from torch.nn import functional as F
66

77
from ..._internally_replaced_utils import load_state_dict_from_url
8+
from ...utils import _log_api_usage_once
89

910

1011
class _SimpleSegmentationModel(nn.Module):
1112
__constants__ = ["aux_classifier"]
1213

1314
def __init__(self, backbone: nn.Module, classifier: nn.Module, aux_classifier: Optional[nn.Module] = None) -> None:
1415
super().__init__()
16+
_log_api_usage_once(self)
1517
self.backbone = backbone
1618
self.classifier = classifier
1719
self.aux_classifier = aux_classifier

torchvision/models/segmentation/lraspp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from torch import nn, Tensor
55
from torch.nn import functional as F
66

7+
from ...utils import _log_api_usage_once
78
from .. import mobilenetv3
89
from ..feature_extraction import create_feature_extractor
910
from ._utils import _load_weights
@@ -37,6 +38,7 @@ def __init__(
3738
self, backbone: nn.Module, low_channels: int, high_channels: int, num_classes: int, inter_channels: int = 128
3839
) -> None:
3940
super().__init__()
41+
_log_api_usage_once(self)
4042
self.backbone = backbone
4143
self.classifier = LRASPPHead(low_channels, high_channels, num_classes, inter_channels)
4244

0 commit comments

Comments
 (0)