class_docstr: Keras compatible data generator that wraps a :class:`.Generator` and provides corrupted data for
  training Deep Graph Infomax.
  
  .. seealso::
  
     Model using this generator: :class:`.DeepGraphInfomax`.
  
     Examples using this generator:
  
     - `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>`__
  
     Generators that support corruption natively: :class:`.FullBatchNodeGenerator`, :class:`.RelationalFullBatchNodeGenerator`, :class:`.GraphSAGENodeGenerator`, :class:`.DirectedGraphSAGENodeGenerator`, :class:`.HinSAGENodeGenerator`, :class:`.ClusterNodeGenerator`.
  
  Args:
      base_generator (Generator): the uncorrupted Generator object.
      corrupt_index_groups (list of list of int, optional): an explicit list of which input
          tensors should be shuffled to create the corrupted inputs. This is a list of "groups",
          where each group is a non-empty list of indices into the tensors that the base generator
          yields. The tensors within each group are flattened to be rank-2 (preserving the last
          dimension, of node features), concatenated, shuffled and split back to their original
          shapes, to compute new corrupted values for each tensors within that group. Each group
          has this operation done independently. Each index can appear in at most one
          group. (This parameter is only optional if ``base_generator`` provides a default via
          ``default_corrupt_input_index_groups``. Otherwise, this parameter must be specified.)
class_docstr_tok: ["Keras","compatible","data","generator","that","wraps","a",":","class",":","`",".Generator","`","and","provides","corrupted","data","for","training","Deep","Graph","Infomax",".","..","seealso",":",":","Model","using","this","generator",":",":","class",":","`",".DeepGraphInfomax","`",".","Examples","using","this","generator",":","-","`","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",">","`","__","Generators","that","support","corruption","natively",":",":","class",":","`",".FullBatchNodeGenerator","`",",",":","class",":","`",".RelationalFullBatchNodeGenerator","`",",",":","class",":","`",".GraphSAGENodeGenerator","`",",",":","class",":","`",".DirectedGraphSAGENodeGenerator","`",",",":","class",":","`",".HinSAGENodeGenerator","`",",",":","class",":","`",".ClusterNodeGenerator","`",".","Args",":","base_generator","(","Generator",")",":","the","uncorrupted","Generator","object",".","corrupt_index_groups","(","list","of","list","of","int",",","optional",")",":","an","explicit","list","of","which","input","tensors","should","be","shuffled","to","create","the","corrupted","inputs",".","This","is","a","list","of","``","groups","''",",","where","each","group","is","a","non-empty","list","of","indices","into","the","tensors","that","the","base","generator","yields",".","The","tensors","within","each","group","are","flattened","to","be","rank-2","(","preserving","the","last","dimension",",","of","node","features",")",",","concatenated",",","shuffled","and","split","back","to","their","original","shapes",",","to","compute","new","corrupted","values","for","each","tensors","within","that","group",".","Each","group","has","this","operation","done","independently",".","Each","index","can","appear","in","at","most","one","group",".","(","This","parameter","is","only","optional","if","``","base_generator","``","provides","a","default","via","``","default_corrupt_input_index_groups","``",".","Otherwise",",","this","parameter","must","be","specified",".",")"]
code: def num_batch_dims(self):
      return self.base_generator.num_batch_dims()
  
file_path: stellargraph/stellargraph/mapper/corrupted.py
imports: import numpy
  from tensorflow.keras.utils import Sequence
  from .None import Generator
  from ..core.validation import comma_sep
label_desc: Use image node_id 2 for calling the CorruptedGenerator obj's underlying member method code with example usage: obj.num_batch_dims() and returns: self