diff --git a/keras/backend.py b/keras/backend.py index 66186ddbf7a..7f5b6b1d4cc 100644 --- a/keras/backend.py +++ b/keras/backend.py @@ -1087,9 +1087,7 @@ def my_op(a): # Export V1 version. _v1_name_scope = tf.compat.v1.name_scope -keras_export(v1=["keras.backend.name_scope"], allow_multiple_exports=True)( - _v1_name_scope -) +keras_export(v1=["keras.backend.name_scope"])(_v1_name_scope) @keras_export("keras.backend.variable") diff --git a/keras/initializers/initializers_v1.py b/keras/initializers/initializers_v1.py index 62d0e2b4f3c..ccac2d3a664 100644 --- a/keras/initializers/initializers_v1.py +++ b/keras/initializers/initializers_v1.py @@ -29,35 +29,30 @@ _v1_glorot_uniform_initializer = tf.compat.v1.glorot_uniform_initializer _v1_glorot_normal_initializer = tf.compat.v1.glorot_normal_initializer +keras_export(v1=["keras.initializers.Zeros", "keras.initializers.zeros"])( + _v1_zeros_initializer +) +keras_export(v1=["keras.initializers.Ones", "keras.initializers.ones"])( + _v1_ones_initializer +) +keras_export(v1=["keras.initializers.Constant", "keras.initializers.constant"])( + _v1_constant_initializer +) +keras_export(v1=["keras.initializers.VarianceScaling"])( + _v1_variance_scaling_initializer +) keras_export( - v1=["keras.initializers.Zeros", "keras.initializers.zeros"], - allow_multiple_exports=True, -)(_v1_zeros_initializer) -keras_export( - v1=["keras.initializers.Ones", "keras.initializers.ones"], - allow_multiple_exports=True, -)(_v1_ones_initializer) -keras_export( - v1=["keras.initializers.Constant", "keras.initializers.constant"], - allow_multiple_exports=True, -)(_v1_constant_initializer) -keras_export( - v1=["keras.initializers.VarianceScaling"], allow_multiple_exports=True -)(_v1_variance_scaling_initializer) -keras_export( - v1=["keras.initializers.Orthogonal", "keras.initializers.orthogonal"], - allow_multiple_exports=True, + v1=["keras.initializers.Orthogonal", "keras.initializers.orthogonal"] )(_v1_orthogonal_initializer) -keras_export( - v1=["keras.initializers.Identity", "keras.initializers.identity"], - allow_multiple_exports=True, -)(_v1_identity) -keras_export( - v1=["keras.initializers.glorot_uniform"], allow_multiple_exports=True -)(_v1_glorot_uniform_initializer) -keras_export( - v1=["keras.initializers.glorot_normal"], allow_multiple_exports=True -)(_v1_glorot_normal_initializer) +keras_export(v1=["keras.initializers.Identity", "keras.initializers.identity"])( + _v1_identity +) +keras_export(v1=["keras.initializers.glorot_uniform"])( + _v1_glorot_uniform_initializer +) +keras_export(v1=["keras.initializers.glorot_normal"])( + _v1_glorot_normal_initializer +) @keras_export(