Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

DataProcessorConfig 类

Configuration settings for data processing pipeline 数据预处理管线的配置设置

Definition

命名空间: DeploySharp.Data
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public class DataProcessorConfig
Inheritance
Object    DataProcessorConfig

备注

Controls how input data (typically images) should be preprocessed before feeding to models. Includes resize behavior and normalization settings.

控制输入数据(通常是图像)在送入模型前应如何预处理。 包含缩放行为和归一化设置。

示例

Typical usage:
C#
// 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 获取或设置输入图像的缩放方式

方法

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

参见