-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
I'm getting an error when I use the momentum optimizer:
TypeError: __init__() missing 1 required positional argument: 'momentum'
Initially I thought was some TF API breakage, but I think the culprit is in this line:
https://github.com/CoderPat/structured-neural-summarization/blob/master/train_and_eval.py#L516
def optimizer(lr): return optimizer_class(lr) # **optimizer_params)
For momentum, the constructor expects more parameters, so I'm guessing the following fixes it:
def optimizer(lr): return optimizer_class(lr, **kwargs)
and the kwargs are picked from the above.
Metadata
Metadata
Assignees
Labels
No labels