DocumentModelOptions<T>
Options & Configuration · AiDotNet.Document.Options
Base configuration options for all document AI models.
For Beginners
You don’t need to set any of these options to get started! The model will use sensible defaults for everything. Only change options if you know you need something different.
Example - Using defaults:
Example - Customizing some options:
How It Works
All options use nullable properties with industry-standard defaults applied internally. This allows zero-configuration usage while still enabling full customization.
Constructors
| Constructor | Summary |
|---|---|
DocumentModelOptions() |
Properties
| Property | Summary |
|---|---|
bool? NormalizeBoundingBoxes { get; set; } |
Gets or sets whether to normalize bounding box coordinates. |
bool? Use2DPositionEmbeddings { get; set; } |
Gets or sets whether to include 2D position embeddings for layout information. |
bool? UseGpu { get; set; } |
Gets or sets whether to use GPU acceleration if available. |
bool? UseGradientClipping { get; set; } |
Gets or sets whether to use gradient clipping. |
bool? UseMixedPrecision { get; set; } |
Gets or sets whether to use mixed precision (FP16) for faster computation. |
double? DropoutRate { get; set; } |
Gets or sets the dropout rate for regularization. |
double? LearningRate { get; set; } |
Gets or sets the learning rate for optimization. |
double? MaxGradientNorm { get; set; } |
Gets or sets the maximum gradient norm for clipping. |
double? WeightDecay { get; set; } |
Gets or sets the weight decay for L2 regularization. |
int? BatchSize { get; set; } |
Gets or sets the batch size for training. |
int? HiddenDimension { get; set; } |
Gets or sets the hidden dimension size for the model. |
int? ImageSize { get; set; } |
Gets or sets the expected input image size. |
int? InputChannels { get; set; } |
Gets or sets the number of input channels. |
int? MaxLayoutElements { get; set; } |
Gets or sets the maximum number of layout elements to process. |
int? MaxSequenceLength { get; set; } |
Gets or sets the maximum text sequence length. |
int? NumAttentionHeads { get; set; } |
Gets or sets the number of attention heads for transformer-based models. |
int? NumLayers { get; set; } |
Gets or sets the number of transformer/encoder layers. |
int? PatchSize { get; set; } |
Gets or sets the patch size for vision transformers. |
int? RandomSeed { get; set; } |
Gets or sets the random seed for reproducibility. |
int? VocabularySize { get; set; } |
Gets or sets the vocabulary size for text tokenization. |