Closed maifeeulasad closed 2 years ago
Can you see if the tests we have introduce with https://github.com/tensorflow/addons/pull/2719 are covering your case?
If not can you extend the test with a PR to cover your case?
Thanks
@bhack it covers my case. Not sure what is causing this error. Though I need to test with a few different versions of TF and TF-addons.
Ok let me know.
Okay, I was able to reproduce this issue with TF-2.6.4
and TFA-0.14.0
. But couldn't reproduce it in the current latest TF-2.10.0
and TFA-0.18.0
. I guess somehow upgrading the kernel will resolve my issue or I can simply override that method MultiOptimizer.get_config
, as already implemented here: https://github.com/JackWindows/tf-addons/blob/1579bb1938c640fc36b224c3d903bfd418a3d40e/tensorflow_addons/optimizers/discriminative_layer_training.py#L146-L154.
Thanks @bhack
2719
I tried on TF-2.6.2, rewrited the discriminative_layer_trainning.py file as it mentioned here: https://github.com/JackWindows/tf-addons/blob/1579bb1938c640fc36b224c3d903bfd418a3d40e/tensorflow_addons/optimizers/discriminative_layer_training.py#L146-L154. But there still raised 'Not JSON Serializable' error. I'm wondering if there is anything I can do with TF-2.6.2 to solve this issue? Since TF-2.6 is required for another package in my task, I can only stick on it. P.S. everything would go well if I chose not to save optimizer status, otherwise it failed.
System information
0.14.0
binary(pip)Describe the bug
I'm trying to save a model which is developed and compiled with MultiOptimizer provided by tensorflow-addons. But it keeps giving me an error saying:
I tried with different models, environments, and versions.
Code to reproduce the issue Kernel: https://www.kaggle.com/code/maifeeulasad/tfa-multioptimizer-model-save?scriptVersionId=108636090
Other info / logs
Ref: https://github.com/tensorflow/tensorflow/issues/58184