title: how to randomly initialize weights in tensorflow?
body: <p>in tensorflow, I learned from the tutorial that one would initialize the variables with something like
  <code>
  sess.run(tf.global_variables_initializer())
  </code></p>
  
  <p>however I found that every time I run this with the same input dataset, the loss value starts with the same value.</p>
  
  <p>I presume this is due to the fact that the initialization is always setting up the variables with the same values. (probably zero)</p>
  
  <p>I wish to randomize the values of weights. I've tried searching for this but  tensorflow docs doesn't give a clear answer if the initialization is done with zero values by default or random values.</p>
  
  <p>How can I specify the initializaing to setup random values?</p>
  
  <hr>
  
  <p><strong>update</strong></p>
  
  <p>my network is first a bunch of CNNs and pooling layers like below:
  ```
  conv1 = tf.layers.conv2d(inputs=input_layer, filters=32, kernel_size=[3,3], padding="same", activation=tf.nn.relu, name="conv_chad_1")</p>
  
  <pre><code>    pool1 = tf.layers.max_pooling2d(inputs=conv1,pool_size=[2,2],strides=2)
  
      conv2 = tf.layers.conv2d(inputs=pool1, filters=64, kernel_size=[3,3], padding="same", activation=tf.nn.relu, name="conv_chad_2")
  
      pool2 = tf.layers.max_pooling2d(inputs=conv2,pool_size=[2,2],strides=2, name="pool_chad_2")
  </code></pre>
  
  <p>```</p>
  
  <p>AFAIK, the weights are defined inside these predefined layers. How do I specify these layers to initialize their weight variables randomly??</p>