Docstrings arguments cleanup (#3229)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
62916b3b0a
commit
bd0f7ecf6f
93 changed files with 1104 additions and 1102 deletions
|
|
@ -190,7 +190,7 @@ class BaseModel(nn.Module):
|
|||
"""Load the weights into the model.
|
||||
|
||||
Args:
|
||||
weights (dict) or (torch.nn.Module): The pre-trained weights to be loaded.
|
||||
weights (dict | torch.nn.Module): The pre-trained weights to be loaded.
|
||||
verbose (bool, optional): Whether to log the transfer progress. Defaults to True.
|
||||
"""
|
||||
model = weights['model'] if isinstance(weights, dict) else weights # torchvision models are not dicts
|
||||
|
|
@ -701,7 +701,7 @@ def guess_model_scale(model_path):
|
|||
which is denoted by n, s, m, l, or x. The function returns the size character of the model scale as a string.
|
||||
|
||||
Args:
|
||||
model_path (str) or (Path): The path to the YOLO model's YAML file.
|
||||
model_path (str | Path): The path to the YOLO model's YAML file.
|
||||
|
||||
Returns:
|
||||
(str): The size character of the model's scale, which can be n, s, m, l, or x.
|
||||
|
|
@ -717,7 +717,7 @@ def guess_model_task(model):
|
|||
Guess the task of a PyTorch model from its architecture or configuration.
|
||||
|
||||
Args:
|
||||
model (nn.Module) or (dict): PyTorch model or model configuration in YAML format.
|
||||
model (nn.Module | dict): PyTorch model or model configuration in YAML format.
|
||||
|
||||
Returns:
|
||||
(str): Task of the model ('detect', 'segment', 'classify', 'pose').
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue