Improve the error message.
Improve the error message.

Because `repr(np.int64(3)) == repr(3)`, the error message is frustratingly confusing when numpy ints are passed as dimensions.

PiperOrigin-RevId: 428366474

keras-team/keras,keras-team/keras