Module: tfa.options

View source on GitHub



Other Members

  • FALLBACK_WARNING_TEMPLATE = "{}\n\nThe {} C++/CUDA custom op could not be loaded.\nFor this reason, Addons will fallback to an implementation written\nin Python with public TensorFlow ops. There worst you might experience with\nthis is a moderate slowdown on GPU. There can be multiple\nreason for this loading error, one of them may be an ABI incompatibility between\nthe TensorFlow installed on your system and the TensorFlow used to compile\nTensorFlow Addons' custom ops. The stacktrace generated when loading the\nshared object file was displayed above.\n\nIf you want this warning to disappear, either make sure the TensorFlow installed\nis compatible with this version of Addons, or tell TensorFlow Addons to\nprefer using Python implementations and not custom C++/CUDA ones. You can do that\nby changing the TF_ADDONS_PY_OPS flag\neither with the environment variable:\nbash\nTF_ADDONS_PY_OPS=1 python\n\nor in your code, after your imports:\npython\nimport tensorflow_addons as tfa\nimport ...\nimport ...\n\ntfa.options.TF_ADDONS_PY_OPS = True\n\n"
  • TF_ADDONS_PY_OPS = False