title: How to initialise only optimizer variables in Tensorflow?
body: <p>I want to use <code>MomentumOptimizer</code> in Tensorflow. However, since this optimizer uses some internal variable, attempting to use it without initializing this variable yields an error: </p>
  
  <blockquote>
    <p><code>FailedPreconditionError</code> (see above for traceback): Attempting to use
     uninitialized value <code>Variable_2/Momentum</code></p>
  </blockquote>
  
  <p>This can be easily solved by initializing all variables, using for example</p>
  
  <pre><code>tf.global_variables_initializer().run()
  </code></pre>
  
  <p>However, I do not want to initialize <strong>all</strong> the variables - only those of optimizer. Is there any way to do this?</p>