You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the file tensorflow2_keras_synthetic_benchmark.py from the examples folder, I get the following error:
[0] Model: ResNet50
[0] Batch size: 32
[0] Number of GPUs: 2
[1] Traceback (most recent call last):
[1] File "horovod/examples/tensorflow2/tensorflow2_keras_synthetic_benchmark.py", line 78, in <module>
[1] opt = hvd.DistributedOptimizer(opt, compression=compression)
[1] File "/opt/conda/lib/python3.7/site-packages/horovod/tensorflow/keras/__init__.py", line 152, in DistributedOptimizer
[1] scale_local_gradients=scale_local_gradients[1]
[1] File "/opt/conda/lib/python3.7/site-packages/horovod/_keras/__init__.py", line 49, in create_distributed_optimizer
[1] check_keras_optimizer_type(keras, optimizer)
[1] File "/opt/conda/lib/python3.7/site-packages/horovod/_keras/__init__.py", line 40, in check_keras_optimizer_type
[1] raise ValueError(f"Optimizer has to be an instance of tensorflow.keras.optimizers.legacy.Optimizer starting from Keras 2.11: {type(optimizer).__name__}")[1]
[1] ValueError[1] : Optimizer has to be an instance of tensorflow.keras.optimizers.legacy.Optimizer starting from Keras 2.11: SGD
[0] Traceback (most recent call last):
[0] File "horovod/examples/tensorflow2/tensorflow2_keras_synthetic_benchmark.py", line 78, in <module>
[0] [0] opt = hvd.DistributedOptimizer(opt, compression=compression)[0]
[0] File "/opt/conda/lib/python3.7/site-packages/horovod/tensorflow/keras/__init__.py", line 152, in DistributedOptimizer
[0] [0] scale_local_gradients=scale_local_gradients[0]
[0] File "/opt/conda/lib/python3.7/site-packages/horovod/_keras/__init__.py", line 49, in create_distributed_optimizer
[0] [0] check_keras_optimizer_type(keras, optimizer)[0]
[0] File "/opt/conda/lib/python3.7/site-packages/horovod/_keras/__init__.py", line 40, in check_keras_optimizer_type
[0] [0] raise ValueError(f"Optimizer has to be an instance of tensorflow.keras.optimizers.legacy.Optimizer starting from Keras 2.11: {type(optimizer).__name__}")[0]
[0] ValueError[0] : [0] Optimizer has to be an instance of tensorflow.keras.optimizers.legacy.Optimizer starting from Keras 2.11: SGD[0]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I run the file tensorflow2_keras_synthetic_benchmark.py from the examples folder, I get the following error:
Can anyone tell me how to fix it?
Beta Was this translation helpful? Give feedback.
All reactions