We can detect it by simply taking a training step and comparing their before and after.
How to unit test machine learning code.
Chase Roberts

Thanks for the post. I think you are absolutely right on the point that tests are essential for doing data science.

To enhance tests a bit more Python’s built in unittest module can be used for writing tests. It has some great utilities that simplify and standardize the process. Also, launching test suites is way simpler.

Another step further would be using Tensorflow extensions for unit tests (they add simplified work with sessions and some tensorflow specifics). The guide is here if anyone is interested: https://www.tensorflow.org/api_guides/python/test