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"]
docstr: A function to create the the Keras inputs and outputs for a Deep Graph Infomax model for unsupervised training.
  
  Note that the :func:`tensorflow.nn.sigmoid_cross_entropy_with_logits` loss must be used with this model.
  
  Example::
  
      dg_infomax = DeepGraphInfoMax(...)
      x_in, x_out = dg_infomax.in_out_tensors()
      model = Model(inputs=x_in, outputs=x_out)
      model.compile(loss=tf.nn.sigmoid_cross_entropy_with_logits, ...)
  
  Returns:
      input and output layers for use with a Keras model
docstr_tok: ["A","function","to","create","the","the","Keras","inputs","and","outputs","for","a","Deep","Graph","Infomax","model","for","unsupervised","training",".","Note","that","the",":","func",":","`","tensorflow.nn.sigmoid_cross_entropy_with_logits","`","loss","must","be","used","with","this","model",".","Example",":",":","dg_infomax","=","DeepGraphInfoMax","(","...",")","x_in",",","x_out","=","dg_infomax.in_out_tensors","(",")","model","=","Model","(","inputs=x_in",",","outputs=x_out",")","model.compile","(","loss=tf.nn.sigmoid_cross_entropy_with_logits",",","...",")","Returns",":","input","and","output","layers","for","use","with","a","Keras","model"]
code: def in_out_tensors(self):
      """
      A function to create the the Keras inputs and outputs for a Deep Graph Infomax model for unsupervised training.
  
      Note that the :func:`tensorflow.nn.sigmoid_cross_entropy_with_logits` loss must be used with this model.
  
      Example::
  
          dg_infomax = DeepGraphInfoMax(...)
          x_in, x_out = dg_infomax.in_out_tensors()
          model = Model(inputs=x_in, outputs=x_out)
          model.compile(loss=tf.nn.sigmoid_cross_entropy_with_logits, ...)
  
      Returns:
          input and output layers for use with a Keras model
      """
  
      x_inp, node_feats = self.base_model.in_out_tensors()
  
      x_corr = [
          Input(batch_shape=x_inp[i].shape)
          for i in self._corruptible_inputs_idxs
      ]
  
      # shallow copy normal inputs and replace corruptible inputs with new inputs
      x_in_corr = x_inp.copy()
      for i, x in zip(self._corruptible_inputs_idxs, x_corr):
          x_in_corr[i] = x
  
      node_feats_corr = self.base_model(x_in_corr)
  
      summary = DGIReadout()(node_feats)
  
      scores = self._discriminator([node_feats, summary])
      scores_corrupted = self._discriminator([node_feats_corr, summary])
  
      x_out = tf.stack([scores, scores_corrupted], axis=-1)
  
      return x_corr + x_inp, x_out
  
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 2 for calling the DeepGraphInfomax obj's underlying member method code with example usage: obj.in_out_tensors() and returns: unknown,  x_out