title: How to load a Keras model in R on Windows?
body: <p>I'm having a hard time to load a keras model (.h5) in R. This is the script that I tried:</p>
  <pre><code>library(keras)
  new_model &lt;- load_model_hdf5(&quot;model1.h5&quot;)
  </code></pre>
  <p>And the error message is:</p>
  <pre><code>Error in load_model_hdf5(&quot;model1.h5&quot;) : 
    The h5py Python package is required to save and load models
  </code></pre>
  <p>I also tried saving the model in a different format (save whole model), but got a different error message. This is what I tried:</p>
  <pre><code>new_model &lt;- load_model_tf('model1')
  </code></pre>
  <p>and error message is:</p>
  <pre><code>Error in if (tensorflow::tf_version() &lt; &quot;2.0.0&quot;) stop(&quot;TensorFlow version &gt;= 2.0.0 is requires to load models in the SavedModel format.&quot;,  : 
    argument is of length zero
  </code></pre>