OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04
TensorFlow version and how it was installed (source or binary): 2.11.0 from source
TensorFlow-Addons version and how it was installed (source or binary): 0.19.0
Python version: 3.9
Is GPU used? (yes/no): yes
Describe the bug
WeightNormalization(Conv1DTranspose(...)) will cause an error when saving the model in tf format
A clear and concise description of what the bug is.
ValueError: Unable to save function b'__inference_conv1d_transpose_3_layer_call_and_return_conditional_losses_101006' because it captures graph tensor Tensor("weight_normalization_21/compute_weights/mul:0", shape=(16, 32, 64), dtype=float32) from a parent function which cannot be converted to a constant with tf.get_static_value.
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
System information
Describe the bug
WeightNormalization(Conv1DTranspose(...)) will cause an error when saving the model in tf format
A clear and concise description of what the bug is.
ValueError: Unable to save function b'__inference_conv1d_transpose_3_layer_call_and_return_conditional_losses_101006' because it captures graph tensor Tensor("weight_normalization_21/compute_weights/mul:0", shape=(16, 32, 64), dtype=float32) from a parent function which cannot be converted to a constant with
tf.get_static_value
.Code to reproduce the issue From official tutorial https://keras.io/examples/audio/melgan_spectrogram_inversion/ Provide a reproducible test case that is the bare minimum necessary to generate the problem.
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.