title: UserWarning: `Sequential.model` is deprecated
body: <p><strong>Log:</strong></p>
  
  <blockquote>
    <p>C:\Users\AppData\Local\Continuum\anaconda3\lib\site-packages\keras\engine\sequential.py:110:</p>
    
    <p><strong>UserWarning</strong>: <code>Sequential.model</code> is deprecated. <code>Sequential</code> is a subclass of <code>Model</code>, you can just use your <code>Sequential</code> instance
    directly.  warnings.warn('<code>Sequential.model</code> is deprecated. '</p>
  </blockquote>
  
  <p><em>When executing the model in jupyter notebook Its working in <code>.ipynb</code> file format but stops working when execute in the VS code in <code>.py</code> file format.</em></p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>from keras.models import Sequential
  from keras.layers import Dense, Activation, Embedding, Flatten, LSTM, Dropout, Conv1D, SpatialDropout1D
  from keras.optimizers import Adam
  
  model = Sequential()
  model.add(Embedding(max_fatures, embed_dim,input_length = x.shape[1]))
  model.add(SpatialDropout1D(0.5))
  model.compile(loss = 'categorical_crossentropy', optimizer='adam',metrics = ['acc'])
  model.summary()
  </code></pre>
  
  <p><strong>Saving the model:</strong></p>
  
  <pre><code>model.model.save('my_model.h5')
  with open('tokenizer.pickle', 'wb') as handle:
      pickle.dump(tokenizer, handle, protocol=pickle.HIGHEST_PROTOCOL)
  </code></pre>