docstr: Constructs the computational graph.
  
  This function constructs the computational graph for the model. It relies
  subclassed methods (build/cost) to construct specific graphs.
  
  Parameters
  ----------
  layer_sizes: list
    List of layer sizes.
  weight_init_stddevs: list
    List of standard deviations for weights (sampled from zero-mean
    gaussians). One for each layer.
  bias_init_consts: list
    List of bias initializations. One for each layer.
  penalty: float
    Amount of penalty (l2 or l1 applied)
  penalty_type: str
    Either "l2" or "l1"
  dropouts: list
    List of dropout amounts. One for each layer.
  learning_rate: float
    Learning rate for model.
  momentum: float
    Momentum. Only applied if optimizer=="momentum"
  optimizer: str
    Type of optimizer applied.
  batch_size: int
    Size of minibatches for training.GraphConv
  verbose: True 
    Perform logging.
  seed: int
    If not none, is used as random seed for tensorflow. 
docstr_tok: ["Constructs","the","computational","graph",".","This","function","constructs","the","computational","graph","for","the","model",".","It","relies","subclassed","methods","(","build\/cost",")","to","construct","specific","graphs",".","Parameters","--","--","--","--","--","layer_sizes",":","list","List","of","layer","sizes",".","weight_init_stddevs",":","list","List","of","standard","deviations","for","weights","(","sampled","from","zero-mean","gaussians",")",".","One","for","each","layer",".","bias_init_consts",":","list","List","of","bias","initializations",".","One","for","each","layer",".","penalty",":","float","Amount","of","penalty","(","l2","or","l1","applied",")","penalty_type",":","str","Either","``","l2","''","or","``","l1","''","dropouts",":","list","List","of","dropout","amounts",".","One","for","each","layer",".","learning_rate",":","float","Learning","rate","for","model",".","momentum",":","float","Momentum",".","Only","applied","if","optimizer==","''","momentum","''","optimizer",":","str","Type","of","optimizer","applied",".","batch_size",":","int","Size","of","minibatches","for","training.GraphConv","verbose",":","True","Perform","logging",".","seed",":","int","If","not","none",",","is","used","as","random","seed","for","tensorflow","."]
code: def __init__(
      self,
      layer_sizes=[1000],
      weight_init_stddevs=[0.02],
      bias_init_consts=[1.0],
      penalty=0.0,
      penalty_type="l2",
      dropouts=[0.5],
      learning_rate=0.001,
      momentum=0.9,
      optimizer="adam",
      batch_size=50,
      pad_batches=False,
      verbose=True,
      seed=None,
      **kwargs,
  ):
      """Constructs the computational graph.
  
      This function constructs the computational graph for the model. It relies
      subclassed methods (build/cost) to construct specific graphs.
  
      Parameters
      ----------
      layer_sizes: list
        List of layer sizes.
      weight_init_stddevs: list
        List of standard deviations for weights (sampled from zero-mean
        gaussians). One for each layer.
      bias_init_consts: list
        List of bias initializations. One for each layer.
      penalty: float
        Amount of penalty (l2 or l1 applied)
      penalty_type: str
        Either "l2" or "l1"
      dropouts: list
        List of dropout amounts. One for each layer.
      learning_rate: float
        Learning rate for model.
      momentum: float
        Momentum. Only applied if optimizer=="momentum"
      optimizer: str
        Type of optimizer applied.
      batch_size: int
        Size of minibatches for training.GraphConv
      verbose: True
        Perform logging.
      seed: int
        If not none, is used as random seed for tensorflow.
      """
      # Save hyperparameters
      self.layer_sizes = layer_sizes
      self.weight_init_stddevs = weight_init_stddevs
      self.bias_init_consts = bias_init_consts
      self.penalty = penalty
      self.penalty_type = penalty_type
      self.dropouts = dropouts
      self.learning_rate = learning_rate
      self.momentum = momentum
      self.optimizer = optimizer
      self.batch_size = batch_size
      self.pad_batches = pad_batches
      self.verbose = verbose
      self.seed = seed
  
      self.build()
      self.optimizer = self.get_training_op()
  
file_path: deepchem/contrib/torch/torch_model.py
imports: import torch
  import time
  import numpy
  from deepchem.trans import undo_transforms
  from deepchem.utils.save import log
  from deepchem.models import Model
label_desc: Use image node_id 1 to create a new TorchMultitaskModel object from inherited base classes: Model with example: obj = TorchMultitaskModel(layer_sizes, weight_init_stddevs, bias_init_consts, penalty, penalty_type, dropouts, learning_rate, momentum, optimizer, batch_size, pad_batches, verbose, seed)