Skip to content

Commit

Permalink
Remove Hindi links
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Aug 24, 2024
1 parent c07b9a8 commit a9af0e2
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions classify/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@


def train(opt, device):
"""Trains a YOLOv5 model, managing datasets, model optimization, logging, and saving checkpoints."""
"""Trains a YOLOv5 model on a dataset, managing data loading, optimization, logging, and checkpoint saving."""
init_seeds(opt.seed + 1 + RANK, deterministic=True)
save_dir, data, bs, epochs, nw, imgsz, pretrained = (
opt.save_dir,
Expand Down Expand Up @@ -311,9 +311,7 @@ def lf(x):


def parse_opt(known=False):
"""Parses command line arguments for YOLOv5 training including model path, dataset, epochs, and more, returning
parsed arguments.
"""
"""Parses command line arguments for YOLOv5 training, returning parsed arguments."""
parser = argparse.ArgumentParser()
parser.add_argument("--model", type=str, default="yolov5s-cls.pt", help="initial weights path")
parser.add_argument("--data", type=str, default="imagenette160", help="cifar10, cifar100, mnist, imagenet, ...")
Expand Down Expand Up @@ -367,8 +365,17 @@ def main(opt):
def run(**kwargs):
"""
Executes YOLOv5 model training or inference with specified parameters, returning updated options.
Example: from yolov5 import classify; classify.train.run(data=mnist, imgsz=320, model='yolov5m')
Args:
**kwargs (Any): Arbitrary keyword arguments to override default training or inference options.
Returns:
(argparse.Namespace): Updated options after parsing and applying overrides.
Examples:
Run YOLOv5 training with custom parameters
>>> from yolov5 import classify
>>> classify.train.run(data='mnist', imgsz=320, model='yolov5m')
"""
opt = parse_opt(True)
for k, v in kwargs.items():
Expand Down

0 comments on commit a9af0e2

Please sign in to comment.