Skip to content

Commit e310ab8

Browse files
Vincent Moensfacebook-github-bot
Vincent Moens
authored andcommitted
[fbsync] Adding logging calls for raft and vit (#5044)
Summary: * Adding logging calls for raft and vit * Linter fix Reviewed By: NicolasHug Differential Revision: D32950945 fbshipit-source-id: 881a032c4e6e0d7444120aa0fa658d051516cde7
1 parent 9decc18 commit e310ab8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

torchvision/models/optical_flow/raft.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from torch.nn.modules.instancenorm import InstanceNorm2d
99
from torchvision.ops import ConvNormActivation
1010

11+
from ...utils import _log_api_usage_once
1112
from ._utils import grid_sample, make_coords_grid, upsample_flow
1213

1314

@@ -432,6 +433,7 @@ def __init__(self, *, feature_encoder, context_encoder, corr_block, update_block
432433
If ``None`` (default), the flow is upsampled using interpolation.
433434
"""
434435
super().__init__()
436+
_log_api_usage_once(self)
435437

436438
self.feature_encoder = feature_encoder
437439
self.context_encoder = context_encoder

torchvision/prototype/models/vision_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import torch.nn as nn
1212
from torch import Tensor
1313

14+
from ...utils import _log_api_usage_once
1415
from ._api import WeightsEnum
1516
from ._utils import handle_legacy_interface
1617

@@ -139,6 +140,7 @@ def __init__(
139140
norm_layer: Callable[..., torch.nn.Module] = partial(nn.LayerNorm, eps=1e-6),
140141
):
141142
super().__init__()
143+
_log_api_usage_once(self)
142144
torch._assert(image_size % patch_size == 0, "Input shape indivisible by patch size!")
143145
self.image_size = image_size
144146
self.patch_size = patch_size

0 commit comments

Comments
 (0)