Skip to content

Commit 7075bf2

Browse files
nkovela1copybara-github
authored andcommitted
Fixes improper serialization code route for functional models.
PiperOrigin-RevId: 524097977
1 parent ac4fc83 commit 7075bf2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tensorflow_graphics/projects/gan/architectures_style_gan_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_style_based_generator_intermediate_outputs_shape(self, batch_size):
6262

6363
def test_cloning_style_based_generator(self):
6464
generator, _, _ = architectures_style_gan.create_style_based_generator()
65+
generator.use_legacy_config = True # Old Keras serialization format flag
6566

6667
with tf.keras.utils.custom_object_scope(
6768
architectures_style_gan.CUSTOM_LAYERS):

tensorflow_graphics/projects/gan/architectures_style_gan_v2_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def test_generator_output_size_with_noise_inputs(self):
6060

6161
def test_cloning_generator(self):
6262
generator, _, _ = architectures_style_gan_v2.create_style_based_generator()
63+
generator.use_legacy_config = True # Old Keras serialization format flag
6364

6465
with tf.keras.utils.custom_object_scope(
6566
architectures_style_gan_v2.CUSTOM_LAYERS):

0 commit comments

Comments
 (0)