class_docstr: Deep Tensor Neural Networks
  
  This class implements deep tensor neural networks as first defined in [1]_
  
  References
  ----------
  .. [1] Schütt, Kristof T., et al. "Quantum-chemical insights from deep
      tensor neural networks." Nature communications 8.1 (2017): 1-8.
class_docstr_tok: ["Deep","Tensor","Neural","Networks","This","class","implements","deep","tensor","neural","networks","as","first","defined","in","[","1","]","_","References","--","--","--","--","--","..","[","1","]","Sch\u00fctt",",","Kristof","T.",",","et","al",".","``","Quantum-chemical","insights","from","deep","tensor","neural","networks",".","''","Nature","communications","8.1","(","2017",")",":","1-8","."]
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,
          ):
              yield (self.compute_features_on_batch(X_b), [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 3 for calling the DTNNModel obj's underlying member method code with example usage: obj.default_generator(dataset, epochs, mode, deterministic, pad_batches) without return types