0

In train.py line 246, we have

# update the learning rate
optim.updateLearningRate(valid_loss, epoch)

However, in onmt/Optim.py, inside function updateLearningRate() at line 37, we have:

def updateLearningRate(self, ppl, epoch):
...
    self.last_ppl = ppl

Why use valid_loss in the place of ppl for updateLearningRate()?

Aren't valid_loss and ppl different measures?

Could anyone help me here, Thanks!

Daniel
  • 1,428
  • 3
  • 16
  • 35

1 Answers1

0

@bmccann has provided an answer here, which I found to be helpful.

Either should work since ppl is just an exponentiated loss: https://github.com/OpenNMT/OpenNMT-py/blob/6b4cb9d60eb662a736b09c69457375939cff5dc6/train.py#L241.

Daniel
  • 1,428
  • 3
  • 16
  • 35