AutoTrain documentation

Image Scoring/Regression Parameters

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.8.21).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Image Scoring/Regression Parameters

The Parameters for image scoring/regression are same as the parameters for image classification.

class autotrain.trainers.image_regression.params.ImageRegressionParams

< >

( data_path: str = None model: str = 'google/vit-base-patch16-224' username: Optional = None lr: float = 5e-05 epochs: int = 3 batch_size: int = 8 warmup_ratio: float = 0.1 gradient_accumulation: int = 1 optimizer: str = 'adamw_torch' scheduler: str = 'linear' weight_decay: float = 0.0 max_grad_norm: float = 1.0 seed: int = 42 train_split: str = 'train' valid_split: Optional = None logging_steps: int = -1 project_name: str = 'project-name' auto_find_batch_size: bool = False mixed_precision: Optional = None save_total_limit: int = 1 token: Optional = None push_to_hub: bool = False eval_strategy: str = 'epoch' image_column: str = 'image' target_column: str = 'target' log: str = 'none' early_stopping_patience: int = 5 early_stopping_threshold: float = 0.01 )

Parameters

  • data_path (str) — Path to the dataset.
  • model (str) — Name of the model to use. Default is “google/vit-base-patch16-224”.
  • username (Optional[str]) — Hugging Face Username.
  • lr (float) — Learning rate. Default is 5e-5.
  • epochs (int) — Number of training epochs. Default is 3.
  • batch_size (int) — Training batch size. Default is 8.
  • warmup_ratio (float) — Warmup proportion. Default is 0.1.
  • gradient_accumulation (int) — Gradient accumulation steps. Default is 1.
  • optimizer (str) — Optimizer to use. Default is “adamw_torch”.
  • scheduler (str) — Scheduler to use. Default is “linear”.
  • weight_decay (float) — Weight decay. Default is 0.0.
  • max_grad_norm (float) — Max gradient norm. Default is 1.0.
  • seed (int) — Random seed. Default is 42.
  • train_split (str) — Train split name. Default is “train”.
  • valid_split (Optional[str]) — Validation split name.
  • logging_steps (int) — Logging steps. Default is -1.
  • project_name (str) — Output directory name. Default is “project-name”.
  • auto_find_batch_size (bool) — Whether to auto find batch size. Default is False.
  • mixed_precision (Optional[str]) — Mixed precision type (fp16, bf16, or None).
  • save_total_limit (int) — Save total limit. Default is 1.
  • token (Optional[str]) — Hub Token.
  • push_to_hub (bool) — Whether to push to hub. Default is False.
  • eval_strategy (str) — Evaluation strategy. Default is “epoch”.
  • image_column (str) — Image column name. Default is “image”.
  • target_column (str) — Target column name. Default is “target”.
  • log (str) — Logging using experiment tracking. Default is “none”.
  • early_stopping_patience (int) — Early stopping patience. Default is 5.
  • early_stopping_threshold (float) — Early stopping threshold. Default is 0.01.

ImageRegressionParams is a configuration class for image regression training parameters.

< > Update on GitHub