Open crclark opened 1 year ago
Same Problems, seem keras can't recognize the customized layer defined in python scripts.
Same here. Could this be related to Keras version?
Same here, any solutions?
Solution: Downgrade autokeras
to 1.0.20
@MSusik Tried it already in colab demo.
ValueError Traceback (most recent call last)
[<ipython-input-3-969c26cf53fe>](https://localhost:8080/#) in <cell line: 41>()
39 return loaded_model
40
---> 41 safety_model = load_safety_model()
42
43
3 frames
[/usr/local/lib/python3.9/dist-packages/autokeras/keras_layers.py](https://localhost:8080/#) in __init__(self, learning_rate, beta_1, beta_2, epsilon, amsgrad, weight_decay_rate, include_in_weight_decay, exclude_from_weight_decay, name, **kwargs)
317 **kwargs
318 ):
--> 319 super(AdamWeightDecay, self).__init__(
320 learning_rate, beta_1, beta_2, epsilon, amsgrad, name, **kwargs
321 )
ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.AdamWeightDecay.
Then you might want play with versions of other packages. For me it works well with tf 2.9
!pip install clip-anytorch autokeras==1.0.20 tensorflow==2.9
works.
Hi, had a similar problem as well, and installing autokeras==1.0.20 tensorflow==2.9
didn't solve my problem. So I converted the models to PyTorch following issue #7 now I can run all the NSFW detectors using PyTorch only.