title: Run keras model (.h5) on Windows 10
body: <p>I trained a model in keras on a Linux platform and saved the model with a <code>model.save_weights("demandFinal.h5")</code></p>
  
  <p>And then I was hoping to take my complete saved model to IPython on my Windows 10 laptop running Anaconda 3.7 and use it with:</p>
  
  <pre><code>from keras.models import load_model
  
  # load weights into new model
  loaded_model.load_weights("demandFinal.h5")
  print("Loaded model from disk")
  </code></pre>
  
  <p>But I am running into some issues.. First I forgot Keras wasn't installed so I did a <code>!pip install keras</code> no problems. Then <code>!pip install Tensorflow</code> whether that was needed or not..</p>
  
  <p>Now I have a numpy error:</p>
  
  <p><code>ImportError: numpy.core.umath failed to import</code></p>
  
  <p>After some research online, I did a <code>pip install -U numpy</code> which installed that package... But I still have the same issue.. When I run the <code>load_model</code> in IPython anaconda 3.7, this will cause the kernel to crash/restart. Full traceback:</p>
  
  <pre><code>C:\Users\bbartling\Desktop\EC
  
  Using TensorFlow backend.
  
  ---------------------------------------------------------------------------
  ModuleNotFoundError                       Traceback (most recent call last)
  ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
  
  
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  ImportError: numpy.core.multiarray failed to import
  
  The above exception was the direct cause of the following exception:
  
  SystemError                               Traceback (most recent call last)
  C:\ProgramData\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
  
  SystemError: &lt;class '_frozen_importlib._ModuleLockManager'&gt; returned a result with an error set
  
  
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  ImportError: numpy.core._multiarray_umath failed to import
  
  
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  ImportError: numpy.core.umath failed to import
  </code></pre>
  
  <p>Hopefully I didn't screw up my anaconda installation... But would anyone have any tips to try? Sorry not a lot of wisdom here... But maybe there is a better way to save the model as json or yml file to the process I was hoping run the model on a Windows machine after the training... </p>
  
  <p>Do utilize a deep learning model on a Windows machine do I need the deep learning libraries installed? I was hoping to not have to install Tensorflow</p>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>See this follow up <a href="https://stackoverflow.com/questions/55050339/keras-prediction-nonetype-object-has-no-attribute-predict?noredirect=1#comment96850733_55050339">SO post</a> as final solution</p>