Hyperparameters Class

Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class Hyperparameters
Inheritance
Object    Hyperparameters

Constructors

HyperparametersInitializes a new instance of the Hyperparameters class

Properties

BatchSize Immutable. The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples.
EpochCount Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used.
LearningRate Optional. Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples.
LearningRateMultiplier Optional. Immutable. The learning rate multiplier is used to calculate a final learningRate based on the default (recommended) value. Actual learning rate := learningRateMultiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also