Update tensorflow to 2.4.0rc4
diff --git a/lib/cli/launcher.py b/lib/cli/launcher.py
index d1030fb405..ad483bf868 100644
--- a/lib/cli/launcher.py
+++ b/lib/cli/launcher.py
@@ -53,10 +53,10 @@ def _test_for_tf_version(self):
         Raises
         ------
         FaceswapError
-            If Tensorflow is not found, or is not between versions 2.2 and 2.2
+            If Tensorflow is not found, or is not between versions 2.2 and 2.4
         """
         min_ver = 2.2
-        max_ver = 2.2
+        max_ver = 2.4
         try:
             # Ensure tensorflow doesn't pin all threads to one core when using Math Kernel Library
             os.environ["TF_MIN_GPU_MULTIPROCESSOR_COUNT"] = "4"
diff --git a/lib/gui/stats.py b/lib/gui/stats.py
index 7cbb323526..41ec71604c 100644
--- a/lib/gui/stats.py
+++ b/lib/gui/stats.py
@@ -17,7 +17,7 @@
 
 import numpy as np
 import tensorflow as tf
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 from tensorflow.core.util import event_pb2
 from lib.serializer import get_serializer
 
diff --git a/plugins/extract/_base.py b/plugins/extract/_base.py
index 7c984281cb..530fc3840e 100644
--- a/plugins/extract/_base.py
+++ b/plugins/extract/_base.py
@@ -6,7 +6,7 @@
 import os
 import sys
 
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 
 from lib.multithreading import MultiThread
 from lib.queue_manager import queue_manager
diff --git a/plugins/extract/align/_base.py b/plugins/extract/align/_base.py
index 77920f6055..5f871e94ac 100644
--- a/plugins/extract/align/_base.py
+++ b/plugins/extract/align/_base.py
@@ -17,7 +17,7 @@
 import cv2
 import numpy as np
 
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 
 from lib.utils import get_backend, FaceswapError
 from plugins.extract._base import Extractor, logger, ExtractMedia
diff --git a/plugins/extract/detect/_base.py b/plugins/extract/detect/_base.py
index e4fcb89c62..522e5fab87 100644
--- a/plugins/extract/detect/_base.py
+++ b/plugins/extract/detect/_base.py
@@ -18,7 +18,7 @@
 import cv2
 import numpy as np
 
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 
 from lib.faces_detect import DetectedFace
 from lib.utils import get_backend, FaceswapError
diff --git a/plugins/extract/mask/_base.py b/plugins/extract/mask/_base.py
index 433b7af148..ac092d5fa0 100644
--- a/plugins/extract/mask/_base.py
+++ b/plugins/extract/mask/_base.py
@@ -16,7 +16,7 @@
 import cv2
 import numpy as np
 
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 
 from lib.utils import get_backend, FaceswapError
 from plugins.extract._base import Extractor, ExtractMedia, logger
diff --git a/plugins/train/model/_base.py b/plugins/train/model/_base.py
index 1bce2d545f..9676897e6a 100644
--- a/plugins/train/model/_base.py
+++ b/plugins/train/model/_base.py
@@ -385,7 +385,7 @@ def _compile_model(self):
                                self.config.get("clipnorm", False),
                                self._args).optimizer
         if self._settings.use_mixed_precision:
-            optimizer = self._settings.LossScaleOptimizer(optimizer, loss_scale="dynamic")
+            optimizer = self._settings.LossScaleOptimizer(optimizer, True)
         if get_backend() == "amd":
             self._rewrite_plaid_outputs()
         self._loss.configure(self._model)
@@ -643,7 +643,7 @@ def __init__(self, arguments, mixed_precision, allow_growth, is_predict):
 
         use_mixed_precision = not is_predict and mixed_precision and get_backend() == "nvidia"
         if use_mixed_precision:
-            self._mixed_precision = tf.keras.mixed_precision.experimental
+            self._mixed_precision = tf.keras.mixed_precision
         else:
             self._mixed_precision = None
 
@@ -746,7 +746,7 @@ def _set_keras_mixed_precision(self, use_mixed_precision, skip_check):
             # TODO remove this hacky fix to disable mixed precision compatibility testing if/when
             # fixed upstream.
             # pylint:disable=import-outside-toplevel,protected-access
-            from tensorflow.python.keras.mixed_precision.experimental import \
+            from tensorflow.python.keras.mixed_precision import \
                 device_compatibility_check
             logger.debug("Overriding tensorflow _logged_compatibility_check parameter. Initial "
                          "value: %s", device_compatibility_check._logged_compatibility_check)
@@ -754,7 +754,7 @@ def _set_keras_mixed_precision(self, use_mixed_precision, skip_check):
             logger.debug("New value: %s", device_compatibility_check._logged_compatibility_check)
 
         policy = self._mixed_precision.Policy('mixed_float16')
-        self._mixed_precision.set_policy(policy)
+        self._mixed_precision.set_global_policy(policy)
         logger.debug("Enabled mixed precision. (Compute dtype: %s, variable_dtype: %s)",
                      policy.compute_dtype, policy.variable_dtype)
         return True
diff --git a/plugins/train/trainer/_base.py b/plugins/train/trainer/_base.py
index b79fffb7fb..9761236dc5 100644
--- a/plugins/train/trainer/_base.py
+++ b/plugins/train/trainer/_base.py
@@ -18,7 +18,7 @@
 import numpy as np
 
 import tensorflow as tf
-from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
+from tensorflow.python.framework import errors_impl as tf_errors  # pylint:disable=no-name-in-module
 from tqdm import tqdm
 
 from lib.alignments import Alignments
diff --git a/requirements_nvidia.txt b/requirements_nvidia.txt
index f695054174..97623dfc31 100644
--- a/requirements_nvidia.txt
+++ b/requirements_nvidia.txt
@@ -1,2 +1,2 @@
 -r _requirements_base.txt
-tensorflow-gpu>=2.2.0,<2.3.0
+tensorflow-gpu==2.4.0rc4

I know this is only a draft, many things don't work like Analysis and learning graph. But I think this is a good point for starting supporting RTX 3080.  I think you should create a new branch to allow people to work on that change. Best! PS. I will try to work on this but I'm not a Python person.