The hyperparameters for training object detectors.
Inherits From: BaseHParams
mediapipe_model_maker.object_detector.HParams(
learning_rate: float = 0.3,
batch_size: int = 8,
epochs: int = 30,
steps_per_epoch: Optional[int] = None,
class_weights: Optional[Mapping[int, float]] = None,
shuffle: bool = False,
repeat: bool = False,
export_dir: str = tempfile.mkdtemp(),
distribution_strategy: str = 'off',
num_gpus: int = 0,
tpu: str = '',
cosine_decay_epochs: Optional[int] = None,
cosine_decay_alpha: float = 1.0
)
Attributes |
learning_rate
|
Learning rate to use for gradient descent training.
|
batch_size
|
Batch size for training.
|
epochs
|
Number of training iterations over the dataset.
|
cosine_decay_epochs
|
The number of epochs for cosine decay learning rate.
See
https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/CosineDecay
for more info.
|
cosine_decay_alpha
|
The alpha value for cosine decay learning rate. See
https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/CosineDecay
for more info.
|
steps_per_epoch
|
Dataclass field
|
class_weights
|
Dataclass field
|
shuffle
|
Dataclass field
|
repeat
|
Dataclass field
|
export_dir
|
Dataclass field
|
distribution_strategy
|
Dataclass field
|
num_gpus
|
Dataclass field
|
tpu
|
Dataclass field
|
Methods
get_strategy
View source