Skip to content

Commit

Permalink
Remove allow_multiple_exports from calls to tf_export
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 554491671
  • Loading branch information
DrMarcII authored and tensorflower-gardener committed Aug 7, 2023
1 parent fbee24c commit cdffff8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 30 deletions.
4 changes: 1 addition & 3 deletions keras/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
49 changes: 22 additions & 27 deletions keras/initializers/initializers_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cdffff8

Please sign in to comment.