class_docstr: Graph Convolutional Models.
  
  This class implements the graph convolutional model from the
  following paper [1]_. These graph convolutions start with a per-atom set of
  descriptors for each atom in a molecule, then combine and recombine these
  descriptors over convolutional layers.
  following [1]_.
  
  
  References
  ----------
  .. [1] Duvenaud, David K., et al. "Convolutional networks on graphs for
      learning molecular fingerprints." Advances in neural information processing
      systems. 2015.
class_docstr_tok: ["Graph","Convolutional","Models",".","This","class","implements","the","graph","convolutional","model","from","the","following","paper","[","1","]","_",".","These","graph","convolutions","start","with","a","per-atom","set","of","descriptors","for","each","atom","in","a","molecule",",","then","combine","and","recombine","these","descriptors","over","convolutional","layers",".","following","[","1","]","_.","References","--","--","--","--","--","..","[","1","]","Duvenaud",",","David","K.",",","et","al",".","``","Convolutional","networks","on","graphs","for","learning","molecular","fingerprints",".","''","Advances","in","neural","information","processing","systems",".","2015","."]
code: def default_generator(
      self,
      dataset,
      epochs=1,
      mode="fit",
      deterministic=True,
      pad_batches=True,
  ):
      for epoch in range(epochs):
          for X_b, y_b, w_b, ids_b in dataset.iterbatches(
              batch_size=self.batch_size,
              deterministic=deterministic,
              pad_batches=pad_batches,
          ):
              if (
                  y_b is not None
                  and self.mode == "classification"
                  and not (mode == "predict")
              ):
                  y_b = to_one_hot(
                      y_b.flatten(), self.n_classes
                  ).reshape(-1, self.n_tasks, self.n_classes)
              multiConvMol = ConvMol.agglomerate_mols(X_b)
              n_samples = np.array(X_b.shape[0])
              inputs = [
                  multiConvMol.get_atom_features(),
                  multiConvMol.deg_slice,
                  np.array(multiConvMol.membership),
                  n_samples,
              ]
              for i in range(
                  1, len(multiConvMol.get_deg_adjacency_lists())
              ):
                  inputs.append(
                      multiConvMol.get_deg_adjacency_lists()[i]
                  )
              yield (inputs, [y_b], [w_b])
  
imports: from collections.abc import Sequence
  import deepchem
  import numpy
  import tensorflow
  from typing import List, Union, Tuple, Iterable, Dict, Optional
  from deepchem.utils.typing import OneOrMany, LossFn, ActivationFn
  from deepchem.data import Dataset, pad_features
  from deepchem.feat.mol_graphs import ConvMol
  from deepchem.metrics import to_one_hot
  from deepchem.models import KerasModel, layers
  from deepchem.models.losses import L2Loss, SoftmaxCrossEntropy, Loss
  from tensorflow.keras.layers import Input, Dense, Reshape, Softmax, Dropout, Activation, BatchNormalization
  import warnings
label_desc: Use image node_id 2 for calling the GraphConvModel obj's underlying member method code with example usage: obj.default_generator(dataset, epochs, mode, deterministic, pad_batches) without return types