class_docstr: Implements the ChemCeption model that leverages the representational capacities
  of convolutional neural networks (CNNs) to predict molecular properties.
  
  The model is based on the description in Goh et al., "Chemception: A Deep
  Neural Network with Minimal Chemistry Knowledge Matches the Performance of
  Expert-developed QSAR/QSPR Models" (https://arxiv.org/pdf/1706.06689.pdf).
  The authors use an image based representation of the molecule, where pixels
  encode different atomic and bond properties. More details on the image repres-
  entations can be found at https://arxiv.org/abs/1710.02238
  
  The model consists of a Stem Layer that reduces the image resolution for the
  layers to follow. The output of the Stem Layer is followed by a series of
  Inception-Resnet blocks & a Reduction layer. Layers in the Inception-Resnet
  blocks process image tensors at multiple resolutions and use a ResNet style
  skip-connection, combining features from different resolutions. The Reduction
  layers reduce the spatial extent of the image by max-pooling and 2-strided
  convolutions. More details on these layers can be found in the ChemCeption
  paper referenced above. The output of the final Reduction layer is subject to
  a Global Average Pooling, and a fully-connected layer maps the features to
  downstream outputs.
  
  In the ChemCeption paper, the authors perform real-time image augmentation by
  rotating images between 0 to 180 degrees. This can be done during model
  training by setting the augment argument to True.
class_docstr_tok: ["Implements","the","ChemCeption","model","that","leverages","the","representational","capacities","of","convolutional","neural","networks","(","CNNs",")","to","predict","molecular","properties",".","The","model","is","based","on","the","description","in","Goh","et","al.",",","``","Chemception",":","A","Deep","Neural","Network","with","Minimal","Chemistry","Knowledge","Matches","the","Performance","of","Expert-developed","QSAR\/QSPR","Models","''","(","https",":","\/\/arxiv.org\/pdf\/1706.06689.pdf",")",".","The","authors","use","an","image","based","representation","of","the","molecule",",","where","pixels","encode","different","atomic","and","bond","properties",".","More","details","on","the","image","repres-","entations","can","be","found","at","https",":","\/\/arxiv.org\/abs\/1710.02238","The","model","consists","of","a","Stem","Layer","that","reduces","the","image","resolution","for","the","layers","to","follow",".","The","output","of","the","Stem","Layer","is","followed","by","a","series","of","Inception-Resnet","blocks","&","a","Reduction","layer",".","Layers","in","the","Inception-Resnet","blocks","process","image","tensors","at","multiple","resolutions","and","use","a","ResNet","style","skip-connection",",","combining","features","from","different","resolutions",".","The","Reduction","layers","reduce","the","spatial","extent","of","the","image","by","max-pooling","and","2-strided","convolutions",".","More","details","on","these","layers","can","be","found","in","the","ChemCeption","paper","referenced","above",".","The","output","of","the","final","Reduction","layer","is","subject","to","a","Global","Average","Pooling",",","and","a","fully-connected","layer","maps","the","features","to","downstream","outputs",".","In","the","ChemCeption","paper",",","the","authors","perform","real-time","image","augmentation","by","rotating","images","between","0","to","180","degrees",".","This","can","be","done","during","model","training","by","setting","the","augment","argument","to","True","."]
docstr: Parameters
  ----------
  img_spec: str, default std
      Image specification used
  img_size: int, default 80
      Image size used
  base_filters: int, default 16
      Base filters used for the different inception and reduction layers
  inception_blocks: dict,
      Dictionary containing number of blocks for every inception layer
  n_tasks: int, default 10
      Number of classification or regression tasks
  n_classes: int, default 2
      Number of classes (used only for classification)
  augment: bool, default False
      Whether to augment images
  mode: str, default regression
      Whether the model is used for regression or classification
docstr_tok: ["Parameters","--","--","--","--","--","img_spec",":","str",",","default","std","Image","specification","used","img_size",":","int",",","default","80","Image","size","used","base_filters",":","int",",","default","16","Base","filters","used","for","the","different","inception","and","reduction","layers","inception_blocks",":","dict",",","Dictionary","containing","number","of","blocks","for","every","inception","layer","n_tasks",":","int",",","default","10","Number","of","classification","or","regression","tasks","n_classes",":","int",",","default","2","Number","of","classes","(","used","only","for","classification",")","augment",":","bool",",","default","False","Whether","to","augment","images","mode",":","str",",","default","regression","Whether","the","model","is","used","for","regression","or","classification"]
code: def __init__(
      self,
      img_spec: str = "std",
      img_size: int = 80,
      base_filters: int = 16,
      inception_blocks: Dict = DEFAULT_INCEPTION_BLOCKS,
      n_tasks: int = 10,
      n_classes: int = 2,
      augment: bool = False,
      mode: str = "regression",
      **kwargs,
  ):
      """
      Parameters
      ----------
      img_spec: str, default std
          Image specification used
      img_size: int, default 80
          Image size used
      base_filters: int, default 16
          Base filters used for the different inception and reduction layers
      inception_blocks: dict,
          Dictionary containing number of blocks for every inception layer
      n_tasks: int, default 10
          Number of classification or regression tasks
      n_classes: int, default 2
          Number of classes (used only for classification)
      augment: bool, default False
          Whether to augment images
      mode: str, default regression
          Whether the model is used for regression or classification
      """
      if img_spec == "engd":
          self.input_shape = (img_size, img_size, 4)
      elif img_spec == "std":
          self.input_shape = (img_size, img_size, 1)
      self.base_filters = base_filters
      self.inception_blocks = inception_blocks
      self.n_tasks = n_tasks
      self.n_classes = n_classes
      self.mode = mode
      self.augment = augment
  
      model, loss, output_types = self._build_graph()
      super(ChemCeption, self).__init__(
          model=model, loss=loss, output_types=output_types, **kwargs
      )
  
imports: import numpy
  import tensorflow
  from typing import Dict
  from deepchem.data.datasets import pad_batch
  from deepchem.models import KerasModel
  from deepchem.models.losses import L2Loss, SoftmaxCrossEntropy, SigmoidCrossEntropy
  from deepchem.metrics import to_one_hot
  from deepchem.models import chemnet_layers
  from tensorflow.keras.layers import Input, Dense, Reshape, Softmax, Activation
  from tensorflow.keras.layers import Conv1D, GRU, LSTM, Bidirectional
  from tensorflow.keras.layers import GlobalAveragePooling2D
label_desc: Use image node_id 1 to create a new ChemCeption object from inherited base classes: KerasModel with example: obj = ChemCeption(img_spec, img_size, base_filters, inception_blocks, n_tasks, n_classes, augment, mode)