Ordinal Classification As Cost Function - In Keras or Tensorflow
Whilst this question is now quite old, I was just looking for the same and came across this implementation for in Keras:

https://github.com/JHart96/keras_ordinal_categorical_crossentropy