Trying to create optimizer slot variable under the scope for tf.distribute.Strategy ((param1)), which is different from the scope used for the original variable ((param1)). Make sure the slot variables are created under the same strategy scope. This may happen if you're restoring from a checkpoint outside the scope
Package:
keras
52268

Exception Class:
ValueError
Raise code
initializer, shape=slot_shape, dtype=var.dtype)
else:
initial_value = initializer
with self._distribution_strategy_scope():
strategy = tf.distribute.get_strategy()
if not strategy.extended.variable_created_in_scope(var):
raise ValueError(
"Trying to create optimizer slot variable under the scope for "
"tf.distribute.Strategy ({}), which is different from the scope "
"used for the original variable ({}). Make sure the slot "
"variables are created under the same strategy scope. This may "
"happen if you're restoring from a checkpoint outside the scope"
.format(strategy, var))
wi
Links to the raise (1)
https://github.com/keras-team/keras/blob/4a978914d2298db2c79baa4012af5ceff4a4e203/keras/optimizer_v2/optimizer_v2.py#L892See also in the other packages (1)
(✅️ Fixed)
tensorflow/trying-to-create-optimizer-sl
NO FIXES YET
Just press the button and we will add solution
to this exception as soon as possible
* As many users press the button, the faster we create a fix
Add a possible fix
Please authorize to post fix