Add compat.v2.compat.v1. It is useful if someone imports from
tensorflow.compat import v2 as tf and then calls tf.compat.v1. PiperOrigin-RevId: 255301700
This commit is contained in:
parent
15f6c30d79
commit
e6939cfb03
@ -149,4 +149,5 @@ if hasattr(_current_module, 'keras'):
|
||||
optimizers = keras.optimizers
|
||||
initializers = keras.initializers
|
||||
|
||||
compat.v2.compat.v1 = compat.v1
|
||||
# pylint: enable=undefined-variable
|
||||
|
@ -141,4 +141,6 @@ try:
|
||||
vars()['__all__'].remove('compiler')
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
compat.v2.compat.v1 = compat.v1
|
||||
# pylint: enable=undefined-variable
|
||||
|
Loading…
Reference in New Issue
Block a user