when i try to do "from tensorflow.keras import intitializers" i get "cannot import name 'set_policy' from 'keras.mixed_precision.policy'" this error. Any solutions?
when i try to do "from tensorflow.keras import intitializers" i get "cannot import name 'set_policy' from 'keras.mixed_precision.policy'" this error. Any solutions?
I would try:
tf.keras.mixed_precision.set_global_policy
or
policy = mixed_precision.Policy('mixed_float16')
mixed_precision.set_global_policy(policy)
More info you can find here:
go to the error directory and change the import from
from tensorflow.python.keras.mixed_precision.policy import set_policy
to
from tensorflow.python.keras.mixed_precision.policy import set_global_policy
or
from tensorflow.python.keras.mixed_precision.policy import set_policy as set_global_policy