Imported from https://github.com/maxpastor/tensorflow-fevrier