  
          Initially just calls `nvcc -V` to get the installed version of Cuda currently in use.
          If this fails, drills down to more OS specific checking methods.
          """
          chk = Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE)
          stdout, stderr = chk.communicate()
          if not stderr:
              version = re.search(r".*release (?P<cuda>\d+\.\d+)",
                                  stdout.decode(locale.getpreferredencoding()))
              self.cuda_version = version.groupdict().get("cuda", None)
              locate = "where" if self._os == "windows" else "which"
 
</s> remove         installed_packages = dict()
        chk = Popen("\"{}\" -m pip freeze".format(sys.executable),
                    shell=True, stdout=PIPE)
        installed = chk.communicate()[0].decode(self.encoding).splitlines()
 </s> add         installed_packages = {}
        with Popen(f"\"{sys.executable}\" -m pip freeze", shell=True, stdout=PIPE) as chk:
            installed = chk.communicate()[0].decode(self.encoding).splitlines() </s> remove             tf_ver = "tensorflow-gpu{}".format(tf_ver)
 </s> add             tf_ver = f"tensorflow-gpu{tf_ver}" </s> remove                 pkg = "{}{}".format(pkg, ",".join("".join(spec) for spec in version))
 </s> add                 pkg = f"{pkg}{','.join(''.join(spec) for spec in version)}" </s> remove             print("Setting Faceswap backend to {}".format(fs_backend.upper()))
 </s> add             print(f"Setting Faceswap backend to {fs_backend.upper()}") </s> remove         self.output.info("Installed pip: {}".format(pip_version))
 </s> add         self.output.info(f"Installed pip: {pip_version}")
        with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
  
          Initially just calls `nvcc -V` to get the installed version of Cuda currently in use.
          If this fails, drills down to more OS specific checking methods.
          """
        with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
        with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
          if not stderr:
              version = re.search(r".*release (?P<cuda>\d+\.\d+)",
                                  stdout.decode(locale.getpreferredencoding()))
              self.cuda_version = version.groupdict().get("cuda", None)
              locate = "where" if self._os == "windows" else "which"
keep keep keep keep replace replace keep keep keep keep keep
 Update code to support Tensorflow versions up to 2.8 (#1213)

* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD 
setup.py