Skip to content

Commit

Permalink
remove Adadelta from legacy optimizers
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkokotila committed Apr 21, 2024
1 parent f190198 commit fcb9e31
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ the below items:
- [ ] Code is [PEP8](https://www.python.org/dev/peps/pep-0008/)
- [ ] I'm making the PR to `master`
- [ ] I've updated the versions based on [Semantic Versioning](https://semver.org/)
- [ ] `setup.py`
- [ ] `talos/__init__.py`
- [ ] `docs/index.html`
- [ ] `docs/_coverpage.md`
Expand Down
2 changes: 1 addition & 1 deletion docs/Examples_Generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ return out, model
### Parameter Dictionary
```python
p = {'activation':['relu', 'elu'],
'optimizer': ['AdaDelta'],
'optimizer': ['Adam'],
'losses': ['logcosh'],
'shapes': ['brick'],
'first_neuron': [32],
Expand Down
2 changes: 1 addition & 1 deletion docs/Examples_Generator_Code.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def mnist_model(x_train, y_train, x_val, y_val, params):
return out, model

p = {'activation':['relu', 'elu'],
'optimizer': ['AdaDelta'],
'optimizer': ['Adam'],
'losses': ['logcosh'],
'shapes': ['brick'],
'first_neuron': [32],
Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](_media/talos_logo_bg.png)

## v1.3.3
## v1.4

> Hyperparameter Experiments with Tensorflow, PyTorch and Keras
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div id="app"></div>
<script>
window.$docsify = {
name: 'Talos 1.3.3',
name: 'Talos 1.4',
repo: 'https://github.com/autonomio/talos',
coverpage: true,
loadSidebar: true,
Expand Down
2 changes: 1 addition & 1 deletion talos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
del commands, scan, model, metrics, key
del sub, keep_from_templates, template_sub, warnings

__version__ = "1.3.3"
__version__ = "1.4"
4 changes: 2 additions & 2 deletions talos/autom8/autoparams.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from tensorflow.keras.optimizers.legacy import Adam, Adagrad, Adadelta, SGD
from tensorflow.keras.optimizers.legacy import Adam, Adagrad, SGD


loss = {'binary': ['binary_crossentropy', 'logcosh'],
Expand Down Expand Up @@ -122,7 +122,7 @@ def optimizers(self, optimizers='auto'):
'''

if optimizers == 'auto':
self._append_params('optimizer', [Adam, Adagrad, Adadelta, SGD])
self._append_params('optimizer', [Adam, Adagrad, SGD])
else:
self._append_params('optimizer', optimizers)

Expand Down
6 changes: 2 additions & 4 deletions talos/model/normalizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ def lr_normalizer(lr, optimizer):
The optimizer. For example, Adagrad, Adam, RMSprop.
"""

from tensorflow.keras.optimizers.legacy import SGD, Adam, Adadelta, Adagrad, Adamax, RMSprop
from tensorflow.keras.optimizers.legacy import SGD, Adam, Adagrad, Adamax, RMSprop
from tensorflow.keras.optimizers.legacy import Adagrad
from talos.utils.exceptions import TalosModelError

if optimizer == Adadelta:
pass
elif optimizer == SGD or optimizer == Adagrad:
if optimizer == SGD or optimizer == Adagrad:
lr /= 100.0
elif optimizer == Adam or optimizer == RMSprop:
lr /= 1000.0
Expand Down
2 changes: 1 addition & 1 deletion tests/performance/memory_pressure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from tensorflow.keras.layers import Conv2D

p = {'activation': ['relu'],
'optimizer': ['AdaDelta'],
'optimizer': ['Adam'],
'losses': ['categorical_crossentropy'],
'dropout': [.2],
'batch_size': [256],
Expand Down

0 comments on commit fcb9e31

Please sign in to comment.