class_docstr: The Ensemble class can be used to create ensembles of stellargraph's graph neural network algorithms including
  GCN, GraphSAGE, GAT, and HinSAGE. Ensembles can be used for training classification and regression problems for
  node attribute inference and link prediction.
  
  The Ensemble class can be used to create Naive ensembles.
  
  Naive ensembles add model diversity by random initialisation of the models' weights (before training) to
  different values. Each model in the ensemble is trained on the same training set of examples.
  
  .. seealso::
  
     Example using ensembles: `node classification <https://stellargraph.readthedocs.io/en/stable/demos/ensembles/ensemble-node-classification-example.html>`__.
  
     Related functionality: :class:`.BaggingEnsemble` for bootstrap sampling while training, in addition to random initialisation.
class_docstr_tok: ["The","Ensemble","class","can","be","used","to","create","ensembles","of","stellargraph","'s","graph","neural","network","algorithms","including","GCN",",","GraphSAGE",",","GAT",",","and","HinSAGE",".","Ensembles","can","be","used","for","training","classification","and","regression","problems","for","node","attribute","inference","and","link","prediction",".","The","Ensemble","class","can","be","used","to","create","Naive","ensembles",".","Naive","ensembles","add","model","diversity","by","random","initialisation","of","the","models","'","weights","(","before","training",")","to","different","values",".","Each","model","in","the","ensemble","is","trained","on","the","same","training","set","of","examples",".","..","seealso",":",":","Example","using","ensembles",":","`","node","classification","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/ensembles\/ensemble-node-classification-example.html",">","`","__",".","Related","functionality",":",":","class",":","`",".BaggingEnsemble","`","for","bootstrap","sampling","while","training",",","in","addition","to","random","initialisation","."]
docstr: This method returns the layer objects for the model specified by the value of ``indx``.
  
  Args:
      indx (None or int): The index  (starting at 0) of the model to return the layers for.
          If it is None, then the layers for the 0-th (or first) model are returned.
  
  Returns:
      list: The layers for the specified model.
docstr_tok: ["This","method","returns","the","layer","objects","for","the","model","specified","by","the","value","of","``","indx","``",".","Args",":","indx","(","None","or","int",")",":","The","index","(","starting","at","0",")","of","the","model","to","return","the","layers","for",".","If","it","is","None",",","then","the","layers","for","the","0-th","(","or","first",")","model","are","returned",".","Returns",":","list",":","The","layers","for","the","specified","model","."]
code: def layers(self, indx=None):
      """
      This method returns the layer objects for the model specified by the value of ``indx``.
  
      Args:
          indx (None or int): The index  (starting at 0) of the model to return the layers for.
              If it is None, then the layers for the 0-th (or first) model are returned.
  
      Returns:
          list: The layers for the specified model.
  
      """
      if indx is not None and not isinstance(indx, (int,)):
          raise ValueError(
              "({}) indx should be None or integer type but received type {}".format(
                  type(self).__name__, type(indx).__name__
              )
          )
      if isinstance(indx, (int,)) and indx < 0:
          raise ValueError(
              "({}) indx must be greater than or equal to zero but received {}".format(
                  type(self).__name__, indx
              )
          )
  
      if indx is None and len(self.models) > 0:
          # Default is to return the layers for the first model
          return self.models[0].layers
  
      if len(self.models) > indx:
          return self.models[indx].layers
      else:
          # Error because index is out of bounds
          raise ValueError(
              "({}) indx {} is out of range 0 to {}".format(
                  type(self).__name__, indx, len(self.models)
              )
          )
  
imports: from stellargraph.layer import *
  import numpy
  from tensorflow import keras
  from tensorflow.keras.callbacks import EarlyStopping
  import stellargraph
label_desc: Use image node_id 3 for calling the Ensemble obj's underlying member method code with example usage: obj.layers(indx) and returns: self, self