TFSimilarity.utils.tf_cap_memory Avoid TF to hog memory before needing it TFSimilarity.utils.tf_cap_memory()