|
|
|
@ -1120,8 +1120,6 @@ class TorchVision(nn.Module): |
|
|
|
|
m (nn.Module): The loaded torchvision model, possibly truncated and unwrapped. |
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
|
c1 (int): Input channels. |
|
|
|
|
c2 (): Output channels. |
|
|
|
|
model (str): Name of the torchvision model to load. |
|
|
|
|
weights (str, optional): Pre-trained weights to load. Default is "DEFAULT". |
|
|
|
|
unwrap (bool, optional): If True, unwraps the model to a sequential containing all but the last `truncate` layers. Default is True. |
|
|
|
@ -1129,7 +1127,7 @@ class TorchVision(nn.Module): |
|
|
|
|
split (bool, optional): Returns output from intermediate child modules as list. Default is False. |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
def __init__(self, c1, c2, model, weights="DEFAULT", unwrap=True, truncate=2, split=False): |
|
|
|
|
def __init__(self, model, weights="DEFAULT", unwrap=True, truncate=2, split=False): |
|
|
|
|
"""Load the model and weights from torchvision.""" |
|
|
|
|
import torchvision # scope for faster 'import ultralytics' |
|
|
|
|
|
|
|
|
|