Skip to content

Commit

Permalink
Creates non-breaking changes where necessary in preparation for switc…
Browse files Browse the repository at this point in the history
…hing all of Keras to new serialization format.

PiperOrigin-RevId: 507864605
  • Loading branch information
nkovela1 authored and copybara-github committed Feb 13, 2023
1 parent 6dc8101 commit 4a57948
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tensorflow_graphics/projects/gan/keras_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,14 @@ def call(
def get_config(self) -> Dict[str, Any]:
"""Returns the config of the layer."""
config = {
'kernel_size':
self._kernel_size,
'filters':
self._filters,
'kernel_initializer':
tf.keras.utils.serialize_keras_object(self._kernel_initializer),
'bias_initializer':
tf.keras.utils.serialize_keras_object(self._bias_initializer),
'kernel_size': self._kernel_size,
'filters': self._filters,
'kernel_initializer': tf.keras.utils.legacy.serialize_keras_object(
self._kernel_initializer
),
'bias_initializer': tf.keras.utils.legacy.serialize_keras_object(
self._bias_initializer
),
}
base_config = super().get_config()
base_config.update(config)
Expand Down

0 comments on commit 4a57948

Please sign in to comment.