Put @keras_serializable only on layers it works on

And only run the test on TF*MainLayer classes so marked.
This commit is contained in:
Gunnlaugur Thor Briem
2020-03-03 22:44:38 +00:00
parent 0c716ede8c
commit 470753bcf5
6 changed files with 2 additions and 7 deletions

View File

@@ -71,6 +71,7 @@ def keras_serializable(cls):
cls.get_config = get_config
cls._keras_serializable = True
return tf.keras.utils.register_keras_serializable()(cls)