SiaNet/History.cs
/// <summary>
/// Adds the specified train loss.
/// </summary>
/// <param name="trainLoss">The train loss.</param>
/// <param name="trainMetric">The train metric.</param>
/// <param name="valLoss">The value loss.</param>
/// <param name="valMetric">The value metric.</param>
Adds the specified train loss.
Adds the specified train loss .
public void Add(List<float> trainLoss, List<float> trainMetric, List<float> valLoss, List<float> valMetric)
        {
            TrainLosses.Add(trainLoss.Average());
            TrainMetrics.Add(trainMetric.Average());
            if (valLoss.Count > 0)
                ValLosses.Add(valLoss.Average());
            if (valMetric.Count > 0)
                ValMetrics.Add(valMetric.Average());
        }
public void Add ( List < float > trainLoss , List < float > trainMetric , List < float > valLoss , List < float > valMetric ) { TrainLosses . Add ( trainLoss . Average ( ) ) ; TrainMetrics . Add ( trainMetric . Average ( ) ) ; if ( valLoss . Count > 0 ) ValLosses . Add ( valLoss . Average ( ) ) ; if ( valMetric . Count > 0 ) ValMetrics . Add ( valMetric . Average ( ) ) ; }
Adds the specified train loss.
Adds the specified train loss .
trainLoss
List<float>
The train loss.
The train loss .
trainMetric
List<float>
The train metric.
The train metric .
valLoss
List<float>
The value loss.
The value loss .
valMetric
List<float>
The value metric.
The value metric .