Skip to content

Commit

Permalink
fix(optimizer): generic from_config
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpinet committed Dec 3, 2024
1 parent d3dfa1d commit 9692ece
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions neuralnetlib/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def from_config(config: dict):
return RMSprop.from_config(config)
elif config['name'] == 'Adam':
return Adam.from_config(config)
elif config['name'] == 'AdaBelief':
return AdaBelief.from_config(config)
elif config['name'] == 'RAdam':
return RAdam.from_config(config)
else:
raise ValueError(f"Unknown optimizer name: {config['name']}")

Expand Down

0 comments on commit 9692ece

Please sign in to comment.