Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongkaifu committed Sep 21, 2024
1 parent 020cdf5 commit 0797604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Seq2SeqSharp/Tools/BaseSeq2SeqFramework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ internal void TrainOneEpoch(int ep, ICorpus<IPairBatch> trainCorpus, ICorpus<IPa

m_weightsUpdateCount++;

float gradNormFactor = 1.0f; // Math.Max(sWordCnt, tWordCnt);
float gradNormFactor = 1.0f / (float)sntPairBatchs.Count;
if (LossScaling > 0.0f)
{
gradNormFactor = gradNormFactor / LossScaling;
Expand Down

0 comments on commit 0797604

Please sign in to comment.