I want to get names of slots from Momentum optimizer in tensorflow with using get_slot_names as it is explained here in tensorflow webpage. I am using following line in my code to get them:
slots=tf.train.MomentumOptimizer(learning_rate=1e-3, momentum=0.9,).get_slot_names()
I ran my graph and then when I print slots it return me only an empty list. Any help will be appreciated.
By the way, my network is working fine in minimizing the loss or for other things. Also, I tried it with other optimizers, but it have same problem.
I am using tf 1.3 in ubuntu 14. Thanks,
Slot_namesare optimizer specific. If you want to get slot for each trainable variables you can useget_slotmethod with the correctslot_name. Slot name created (by default) formomentum_optimizerismomentum. Below is a simple example to illustrate the points.