mediapipe_model_maker.gesture_recognizer.HParams
The hyperparameters for training gesture recognizer.
Inherits From: BaseHParams
mediapipe_model_maker.gesture_recognizer.HParams(
learning_rate: float = 0.001,
batch_size: int = 2,
epochs: int = 10,
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 = '',
lr_decay: float = 0.99,
gamma: int = 2
)
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.
|
lr_decay
|
Learning rate decay to use for gradient descent training.
|
gamma
|
Gamma parameter for focal loss.
|
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
get_strategy()
__eq__
__eq__(
other
)
Class Variables |
batch_size
|
2
|
class_weights
|
None
|
distribution_strategy
|
'off'
|
epochs
|
10
|
export_dir
|
'/tmpfs/tmp/tmpnt_h4p9w'
|
gamma
|
2
|
learning_rate
|
0.001
|
lr_decay
|
0.99
|
num_gpus
|
0
|
repeat
|
False
|
shuffle
|
False
|
steps_per_epoch
|
None
|
tpu
|
''
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-07 UTC."],[],[],null,["# mediapipe_model_maker.gesture_recognizer.HParams\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/google/mediapipe/blob/master/mediapipe/model_maker/python/vision/gesture_recognizer/hyperparameters.py#L21-L40) |\n\nThe hyperparameters for training gesture recognizer.\n\nInherits From: [`BaseHParams`](../../mediapipe_model_maker/face_stylizer/hyperparameters/hp/BaseHParams) \n\n mediapipe_model_maker.gesture_recognizer.HParams(\n learning_rate: float = 0.001,\n batch_size: int = 2,\n epochs: int = 10,\n steps_per_epoch: Optional[int] = None,\n class_weights: Optional[Mapping[int, float]] = None,\n shuffle: bool = False,\n repeat: bool = False,\n export_dir: str = tempfile.mkdtemp(),\n distribution_strategy: str = 'off',\n num_gpus: int = 0,\n tpu: str = '',\n lr_decay: float = 0.99,\n gamma: int = 2\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-------------------------|-----------------------------------------------------------|\n| `learning_rate` | Learning rate to use for gradient descent training. |\n| `batch_size` | Batch size for training. |\n| `epochs` | Number of training iterations over the dataset. |\n| `lr_decay` | Learning rate decay to use for gradient descent training. |\n| `gamma` | Gamma parameter for focal loss. |\n| `steps_per_epoch` | Dataclass field |\n| `class_weights` | Dataclass field |\n| `shuffle` | Dataclass field |\n| `repeat` | Dataclass field |\n| `export_dir` | Dataclass field |\n| `distribution_strategy` | Dataclass field |\n| `num_gpus` | Dataclass field |\n| `tpu` | Dataclass field |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `get_strategy`\n\n[View source](https://github.com/google/mediapipe/blob/master/mediapipe/model_maker/python/core/hyperparameters.py#L86-L87) \n\n get_strategy()\n\n### `__eq__`\n\n __eq__(\n other\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Class Variables --------------- ||\n|-----------------------|----------------------------|\n| batch_size | `2` |\n| class_weights | `None` |\n| distribution_strategy | `'off'` |\n| epochs | `10` |\n| export_dir | `'/tmpfs/tmp/tmpnt_h4p9w'` |\n| gamma | `2` |\n| learning_rate | `0.001` |\n| lr_decay | `0.99` |\n| num_gpus | `0` |\n| repeat | `False` |\n| shuffle | `False` |\n| steps_per_epoch | `None` |\n| tpu | `''` |\n\n\u003cbr /\u003e"]]