https://docs.nvidia.com/deeplearning/frameworks/tensorflow-user-guide/index.html#tfampSee section 6 and 7.