title: What is the default kernel initializer in tf.layers.conv2d and tf.layers.dense?
body: <p>The official Tensorflow API doc claims that the parameter <code>kernel_initializer</code> defaults to <code>None</code> for <code>tf.layers.conv2d</code> and <code>tf.layers.dense</code>.</p>
  
  <p>However, reading the layers tutorial (<a href="https://www.tensorflow.org/tutorials/layers" rel="noreferrer">https://www.tensorflow.org/tutorials/layers</a>), I noted that this parameter is not set in the code. For example:</p>
  
  
  
  <pre class="lang-py prettyprint-override"><code># Convolutional Layer #1
  conv1 = tf.layers.conv2d(
      inputs=input_layer,
      filters=32,
      kernel_size=[5, 5],
      padding="same",
      activation=tf.nn.relu)
  </code></pre>
  
  <p>The example code from the tutorial runs without any errors, so I think the default <code>kernel_initializer</code> is not <code>None</code>. So, which initializer is used?</p>
  
  <p>In another code, I did not set the <code>kernel_initializer</code> of the conv2d and dense layers, and everything was fine. However, when I tried to set the <code>kernel_initializer</code> to <code>tf.truncated_normal_initializer(stddev=0.1, dtype=tf.float32)</code>, I got NaN errors. What is going on here? Can anyone help?</p>