Skip to content

Commit

Permalink
Using token# rather than batch# for graident normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongkaifu committed Nov 30, 2023
1 parent 57b49fe commit 6b3861c
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 @@ -494,7 +494,7 @@ internal void TrainOneEpoch(int ep, ICorpus<IPairBatch> trainCorpus, ICorpus<IPa
List<IWeightTensor> models = GetParametersFromDefaultDevice();

m_weightsUpdateCount++;
solver.UpdateWeights(models, processedLine, lr, m_regc, m_weightsUpdateCount);
solver.UpdateWeights(models, sWordCnt + tWordCnt, lr, m_regc, m_weightsUpdateCount);

costInTotal += cost;
updatesInOneEpoch++;
Expand Down

0 comments on commit 6b3861c

Please sign in to comment.