title: How to solve " NameError: name 'model' is not defined " error?
body: <p>While trying to predict the output I am facing the error <code>NameError: name 'model' is not defined</code>. How to solve this.</p>
  
  <pre><code>%%time
  # Lstm
  model = Sequential()
  model.add(LSTM(data_dim, input_shape=(95,data_dim), activation='relu'))
  model.add(Dense(data_dim))
  model.compile(loss='mse', optimizer='adam')
  model.fit(X_train, y_train, epochs=10, batch_size=96)
  model.summary()
  </code></pre>
  
  <p>The above model trained well. While trying <code>model.predict(X_test1)</code>, I am having the issue mentioned above.</p>