class_docstr: Tests for ops in horovod.tensorflow.keras.
class_docstr_tok: ["Tests","for","ops","in","horovod.tensorflow.keras","."]
code: def __init__(self, *args, **kwargs):
      super(Tf2KerasTests, self).__init__(*args, **kwargs)
      warnings.simplefilter("module")
      hvd.init()
  
      gpus = tf.config.experimental.list_physical_devices("GPU")
      for gpu in gpus:
          tf.config.experimental.set_memory_growth(gpu, True)
      if gpus:
          tf.config.experimental.set_visible_devices(
              gpus[hvd.local_rank()], "GPU"
          )
  
imports: import tensorflow
  import numpy
  import warnings
  from packaging import version
  from parameterized import parameterized
  import pytest
  from tensorflow import keras
  from horovod.common.util import is_version_greater_equal_than
  import horovod.keras
  import horovod.tensorflow.keras
label_desc: Use image node_id 1 to create a new Tf2KerasTests object from inherited base classes: tf.test with example: obj = Tf2KerasTests()