You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/SGDLib/Criterion.h
+35-4Lines changed: 35 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,17 @@ struct EpochCriterion : public std::pair<double, size_t>
74
74
75
75
// We accumulate criteria in this struct.
76
76
// Criteria are accumulated together with their counts (counts depend on sequence lengths, and different criteria may have different sequence lengths).
77
+
structCriterionAccumulatorBase
78
+
{
79
+
CriterionAccumulatorBase() {};
80
+
virtual~CriterionAccumulatorBase() {};
81
+
virtualconst CriterionAccumulatorBase& Add(size_t i, size_t numSamplesInMinibatch) = 0;
82
+
virtualconst CriterionAccumulatorBase& Assign(size_t i, size_t numSamplesInMinibatch) = 0;
0 commit comments