title: AttributeError: module 'keras.utils' has no attribute 'to_categorical'
body: <pre><code>from keras.preprocessing.text import text_to_word_sequence
  import pandas as pd
  from keras.preprocessing.text import Tokenizer
  import numpy as np
  # from __future__ import print_function
  from keras.preprocessing import sequence
  from keras.models import Sequential
  from keras.layers import Dense, Dropout, Activation
  from keras.layers import Embedding
  from keras.layers import Conv1D, GlobalMaxPooling1D
  x = df_f.iloc[:, 1].values
  y = df_f.iloc[:, 0].values
  tk = Tokenizer(num_words= 200, filters = '!&quot;#$%&amp;()*+,-./:;&lt;=&gt;?@[\\]^_`{|}~\t\n',lower=True, 
  split=&quot; &quot;)
  tk.fit_on_texts(x)
  x = tk.texts_to_sequences(x)
  x = sequence.pad_sequences(x, maxlen=200)
  from keras import utils as np_utils
  y =np_utils.to_categorical(y, num_classes= 24)
  </code></pre>
  <p>I am using keras version 2.5 and tenser flow version 2.5 I import  utils from keras</p>