Simplify thop imports (#18717)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
c6dd277493
commit
daaebba220
5 changed files with 6 additions and 17 deletions
|
|
@ -1131,7 +1131,7 @@ class TorchVision(nn.Module):
|
|||
|
||||
def __init__(self, c1, c2, model, weights="DEFAULT", unwrap=True, truncate=2, split=False):
|
||||
"""Load the model and weights from torchvision."""
|
||||
import torchvision
|
||||
import torchvision # scope for faster 'import ultralytics'
|
||||
|
||||
super().__init__()
|
||||
if hasattr(torchvision.models, "get_model"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue