title: Passing a placeholder for an optimizer results in an error "initial_value must have shape specified"
body: <p>Training a network, wanted to be able to pass the beta1 parameter as an argument and therefore made it a placeholder</p>
  
  <p><code>self.beta1 = tf.placeholder(tf.float32)</code></p>
  
  <p>a couple of lines later an error occurs on this line</p>
  
  <p><code>self.train_adam = tf.train.AdamOptimizer(self.eta, beta1=self.beta1, epsilon=1e-15).minimize(self.cost_m)</code></p>
  
  <p>Error:
  <code>ValueError: initial_value must have a shape specified: Tensor("Placeholder_5:0", dtype=float32)</code></p>
  
  <p>Taking <code>beta1=self.beta1</code> out results in the error disappearing so the error must have to do with that.</p>
  
  <p>I have no clue why this is happening as <code>placeholders</code> do not need to have a shape specified. I have tried using <code>self.beta1 = tf.placeholder(tf.float32, shape=None)</code>, that also doesn't work, same error.</p>
  
  <p>Any ideas?</p>