title: Making neural network training reproducible using RStudio's Keras interface
body: <p>I'm trying to make neural network training reproducible using RStudio's Keras interface. Setting a seed in the R script (<code>set.seed(42)</code>) doesn't seem to work. Is it possible to pass seeding as an argument to <code>layer_dense()</code>? I can choose <code>RandomUniform</code> as an initializer but I'm having difficulty passing a seeding argument along with it. The following line throws an error:</p>
  
  <p><code>model %&gt;% layer_dense(units = 12, activation = 'relu', input_shape = c(8), kernel_initializer = "RandomUniform(seed=1)")</code></p>
  
  <p>But a layer can be added without the attempt to pass a seed argument:</p>
  
  <p><code>model %&gt;% layer_dense(units = 12, activation = 'relu', input_shape = c(8), kernel_initializer = "RandomUniform")</code></p>
  
  <p><code>RandomUniform</code> is suppose to take a seed argument according to the <a href="https://keras.io/initializers/" rel="nofollow noreferrer">Keras initializer documents</a>.</p>