class_docstr: A class to wrap stellargraph models for Deep Graph Infomax unsupervised training
  (https://arxiv.org/pdf/1809.10341.pdf).
  
  .. seealso::
  
     Examples using Deep Graph Infomax:
  
     - `unsupervised representation learning <https://stellargraph.readthedocs.io/en/stable/demos/embeddings/deep-graph-infomax-embeddings.html>`__
     - `semi-supervised node classification <https://stellargraph.readthedocs.io/en/stable/demos/node-classification/gcn-deep-graph-infomax-fine-tuning-node-classification.html>`__
  
     Appropriate data generator: :class:`.CorruptedGenerator`.
  
  Args:
      base_model: the base stellargraph model class
class_docstr_tok: ["A","class","to","wrap","stellargraph","models","for","Deep","Graph","Infomax","unsupervised","training","(","https",":","\/\/arxiv.org\/pdf\/1809.10341.pdf",")",".","..","seealso",":",":","Examples","using","Deep","Graph","Infomax",":","-","`","unsupervised","representation","learning","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/embeddings\/deep-graph-infomax-embeddings.html",">","`","__","-","`","semi-supervised","node","classification","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/node-classification\/gcn-deep-graph-infomax-fine-tuning-node-classification.html",">","`","__","Appropriate","data","generator",":",":","class",":","`",".CorruptedGenerator","`",".","Args",":","base_model",":","the","base","stellargraph","model","class"]
code: def __init__(self, base_model, corrupted_generator=None):
      if corrupted_generator is None:
          warnings.warn(
              "The 'corrupted_generator' parameter should be set to an instance of `CorruptedGenerator`, because the support for specific algorithms is being replaced by a more general form",
              DeprecationWarning,
              stacklevel=2,
          )
          if isinstance(base_model, (GCN, GAT, APPNP, PPNP)):
              self._corruptible_inputs_idxs = [0]
          elif isinstance(base_model, DirectedGraphSAGE):
              self._corruptible_inputs_idxs = np.arange(
                  base_model.max_slots
              )
          elif isinstance(base_model, GraphSAGE):
              self._corruptible_inputs_idxs = np.arange(
                  base_model.max_hops + 1
              )
          else:
              raise TypeError(
                  f"base_model: expected GCN, GAT, APPNP, PPNP, GraphSAGE,"
                  f"or DirectedGraphSAGE, found {type(base_model).__name__}"
              )
      elif not isinstance(corrupted_generator, CorruptedGenerator):
          raise TypeError(
              f"corrupted_generator: expected a CorruptedGenerator, found {type(corrupted_generator).__name__}"
          )
      else:
          self._corruptible_inputs_idxs = [
              idx
              for group in corrupted_generator.corrupt_index_groups
              for idx in group
          ]
  
      self.base_model = base_model
  
      self._node_feats = None
      self._discriminator = DGIDiscriminator()
  
imports: from .None import GCN, GAT, APPNP, PPNP, GraphSAGE, DirectedGraphSAGE
  from .misc import deprecated_model_function
  from ..mapper import CorruptedGenerator
  from tensorflow.keras.layers import Input, Lambda, Layer, GlobalAveragePooling1D
  import tensorflow
  from tensorflow.keras import backend
  import warnings
  import numpy
label_desc: Use image node_id 1 to create a new DeepGraphInfomax object  with example: obj = DeepGraphInfomax(base_model, corrupted_generator)