added example to illustrate effects of `to_categorical`  (#11327)
added example to illustrate effects of `to_categorical`  (#11327)

* added example to illustrate effects better

* aligned code snippet to keras.utils.generic_utils

* Simplify example.

keras-team/keras,keras-team/keras