83 lines
1.9 KiB
C#
83 lines
1.9 KiB
C#
namespace OrpaonVision.Core.Training.Contracts.Commands;
|
||
|
||
/// <summary>
|
||
/// 提交训练任务命令。
|
||
/// </summary>
|
||
public sealed class SubmitTrainingJobCommand
|
||
{
|
||
/// <summary>
|
||
/// 训练任务名称。
|
||
/// </summary>
|
||
public string Name { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 训练任务描述。
|
||
/// </summary>
|
||
public string Description { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 数据集版本ID。
|
||
/// </summary>
|
||
public Guid DatasetVersionId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 训练算法类型。
|
||
/// </summary>
|
||
public string AlgorithmType { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 训练参数(JSON)。
|
||
/// </summary>
|
||
public string TrainingParametersJson { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 总轮次。
|
||
/// </summary>
|
||
public int TotalEpochs { get; init; } = 100;
|
||
|
||
/// <summary>
|
||
/// 批次大小。
|
||
/// </summary>
|
||
public int BatchSize { get; init; } = 16;
|
||
|
||
/// <summary>
|
||
/// 学习率。
|
||
/// </summary>
|
||
public decimal LearningRate { get; init; } = 0.001m;
|
||
|
||
/// <summary>
|
||
/// 早停轮次。
|
||
/// </summary>
|
||
public int EarlyStoppingPatience { get; init; } = 10;
|
||
|
||
/// <summary>
|
||
/// 保存间隔轮次。
|
||
/// </summary>
|
||
public int SaveIntervalEpochs { get; init; } = 10;
|
||
|
||
/// <summary>
|
||
/// 验证间隔轮次。
|
||
/// </summary>
|
||
public int ValidationIntervalEpochs { get; init; } = 1;
|
||
|
||
/// <summary>
|
||
/// 是否启用混合精度。
|
||
/// </summary>
|
||
public bool EnableMixedPrecision { get; init; } = false;
|
||
|
||
/// <summary>
|
||
/// GPU设备ID。
|
||
/// </summary>
|
||
public int GpuDeviceId { get; init; } = 0;
|
||
|
||
/// <summary>
|
||
/// 随机种子。
|
||
/// </summary>
|
||
public int? RandomSeed { get; init; }
|
||
|
||
/// <summary>
|
||
/// 创建者。
|
||
/// </summary>
|
||
public string CreatedBy { get; init; } = string.Empty;
|
||
}
|