Skip to content

Commit

Permalink
Update optimizer normalization factor
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongkaifu committed Jan 2, 2024
1 parent 90c3563 commit f7a258e
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, (int)Math.Max(Math.Sqrt(sWordCnt), Math.Sqrt(tWordCnt)), lr, m_regc, m_weightsUpdateCount);
solver.UpdateWeights(models, (int)Math.Max(sWordCnt, tWordCnt), lr, m_regc, m_weightsUpdateCount);

costInTotal += cost;
updatesInOneEpoch++;
Expand Down

0 comments on commit f7a258e

Please sign in to comment.