Reset Tensor Flow Optimizer

I load from a saved model, and I would like to be able to reset the tensor flow optimizer, such as the Adam optimizer. Ideally, something like:

sess.run([tf.initialize_variables(Adamopt)])

or

sess.run([Adamopt.reset])

I tried to find the answer, but have not yet found a way to do this. Here is what I found that does not solve the problem: https://github.com/tensorflow/tensorflow/issues/634

Is there a way in TensorFlow to simply initialize uninitialized variables?

Tensorflow: Using Adam's Optimizer

I just want to use the reset "slot" variables in Hell Optimizer.

thank

+4
source share
1 answer

, , - ,

optimizer_scope = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES,
                                 "scope/prefix/for/optimizer")
sess.run(tf.initialize_variables(optimizer_scope))

+2

Source: https://habr.com/ru/post/1655277/


All Articles