Expand description
Input Validation Utilities
This module provides comprehensive validation utilities to prevent runtime panics and ensure data integrity across the OCR pipeline.
Functionsยง
- validate_
batch_ size - Validates that tensor batch size is positive.
- validate_
division - Validates division operands to prevent division by zero.
- validate_
finite - Validates that a float value is finite (not NaN or infinite).
- validate_
image_ dimensions - Validates image dimensions.
- validate_
index_ bounds - Validates that array index is within bounds.
- validate_
non_ empty - Validates that a collection is not empty.
- validate_
non_ negative - Validates that a value is non-negative (>= 0).
- validate_
normalization_ params - Validates normalization parameters (mean and std).
- validate_
positive - Validates that a value is positive (> 0).
- validate_
range - Validates that a value is within a specified range (inclusive).
- validate_
same_ length - Validates that two collections have the same length.
- validate_
tensor_ shape - Validates tensor shape dimensions.