Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions torchvision/models/optical_flow/raft.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from torch.nn.modules.instancenorm import InstanceNorm2d
from torchvision.ops import ConvNormActivation

from ...utils import _log_api_usage_once
from ._utils import grid_sample, make_coords_grid, upsample_flow


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

self.feature_encoder = feature_encoder
self.context_encoder = context_encoder
Expand Down
2 changes: 2 additions & 0 deletions torchvision/prototype/models/vision_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import torch.nn as nn
from torch import Tensor

from ...utils import _log_api_usage_once
from ._api import WeightsEnum
from ._utils import handle_legacy_interface

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