Skip to content

Commit 45c447f

Browse files
authored
Merge pull request #1363 from Jasha10/patch-1
Update type hint for `register_notrace_module`
2 parents d7b55a9 + 56c3a84 commit 45c447f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timm/models/fx_features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
""" PyTorch FX Based Feature Extraction Helpers
22
Using https://pytorch.org/vision/stable/feature_extraction.html
33
"""
4-
from typing import Callable, List, Dict, Union
4+
from typing import Callable, List, Dict, Union, Type
55

66
import torch
77
from torch import nn
@@ -35,7 +35,7 @@
3535
pass
3636

3737

38-
def register_notrace_module(module: nn.Module):
38+
def register_notrace_module(module: Type[nn.Module]):
3939
"""
4040
Any module not under timm.models.layers should get this decorator if we don't want to trace through it.
4141
"""

0 commit comments

Comments
 (0)