public class DataProcessorConfig
Controls how input data (typically images) should be preprocessed before feeding to models. Includes resize behavior and normalization settings.
控制输入数据(通常是图像)在送入模型前应如何预处理。 包含缩放行为和归一化设置。
// Configure preprocessing with padding resize and imagenet normalization
var config = new DataProcessorConfig(
resizeMode: ImageResizeMode.Pad,
normalizationType: ImageNormalizationType.ImageNet);
// Or configure with custom normalization parameters
var customConfig = new DataProcessorConfig {
ResizeMode = ImageResizeMode.Crop,
NormalizationType = ImageNormalizationType.Custom,
CustomNormalizationParams = new NormalizationParams(mean: [0.5,0.5,0.5], std: [0.5,0.5,0.5])
};
DataProcessorConfig | Initializes a new instance with default settings (ResizeMode=Stretch, NormalizationType=None) 使用默认设置初始化新实例(缩放模式=拉伸,归一化类型=无) |
DataProcessorConfig(ImageResizeMode, ImageNormalizationType, NormalizationParams) | Initializes a new instance with specified processing settings 使用指定的处理设置初始化新实例 |
CustomNormalizationParams | Gets or sets custom normalization parameters 获取或设置自定义归一化参数 |
NormalizationType | Gets or sets the normalization method to apply 获取或设置应用的归一化方法 |
ResizeMode | Gets or sets how input images should be resized 获取或设置输入图像的缩放方式 |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetType | Gets the Type of the current instance. (继承自 Object。) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
ToString | Returns a string that represents the current object. (继承自 Object。) |