title: Is one hot encoding required in Keras?
body: <p>I have a dataset with labels from 0-4. I one-hot encode them into np arrays using following code:<code>labels = (np.arange(5) == labels[:, None]).astype(np.float32)</code>. My question is, do we have to one hot encode them? Can I just keep the labels numeric/float from 0-4 and use them? If so how?</p>