class_docstr: Implements an icml model as configured in a model_config.proto.
class_docstr_tok: ["Implements","an","icml","model","as","configured","in","a","model_config.proto","."]
docstr: Constructs the graph architecture as specified in its config.
  
  This method creates the following Placeholders:
    mol_features: Molecule descriptor (e.g. fingerprint) tensor with shape
      batch_size x n_features.
docstr_tok: ["Constructs","the","graph","architecture","as","specified","in","its","config",".","This","method","creates","the","following","Placeholders",":","mol_features",":","Molecule","descriptor","(","e.g",".","fingerprint",")","tensor","with","shape","batch_size","x","n_features","."]
code: def build(self, graph, name_scopes, training):
      """Constructs the graph architecture as specified in its config.
  
      This method creates the following Placeholders:
        mol_features: Molecule descriptor (e.g. fingerprint) tensor with shape
          batch_size x n_features.
      """
      n_features = self.n_features
      placeholder_scope = TensorflowGraph.get_placeholder_scope(
          graph, name_scopes
      )
      with graph.as_default():
          with placeholder_scope:
              self.mol_features = tf.placeholder(
                  tf.float32,
                  shape=[None, n_features],
                  name="mol_features",
              )
  
          layer_sizes = self.layer_sizes
          weight_init_stddevs = self.weight_init_stddevs
          bias_init_consts = self.bias_init_consts
          dropouts = self.dropouts
          lengths_set = {
              len(layer_sizes),
              len(weight_init_stddevs),
              len(bias_init_consts),
              len(dropouts),
          }
          assert (
              len(lengths_set) == 1
          ), "All layer params must have same length."
          n_layers = lengths_set.pop()
          assert n_layers > 0, "Must have some layers defined."
  
          prev_layer = self.mol_features
          prev_layer_size = n_features
          for i in range(n_layers):
              layer = tf.nn.relu(
                  model_ops.fully_connected_layer(
                      tensor=prev_layer,
                      size=layer_sizes[i],
                      weight_init=tf.truncated_normal(
                          shape=[prev_layer_size, layer_sizes[i]],
                          stddev=weight_init_stddevs[i],
                      ),
                      bias_init=tf.constant(
                          value=bias_init_consts[i],
                          shape=[layer_sizes[i]],
                      ),
                  )
              )
              layer = model_ops.dropout(layer, dropouts[i], training)
              prev_layer = layer
              prev_layer_size = layer_sizes[i]
  
          output = []
          for task in range(self.n_tasks):
              output.append(
                  tf.squeeze(
                      model_ops.fully_connected_layer(
                          tensor=prev_layer,
                          size=layer_sizes[i],
                          weight_init=tf.truncated_normal(
                              shape=[prev_layer_size, 1],
                              stddev=weight_init_stddevs[i],
                          ),
                          bias_init=tf.constant(
                              value=bias_init_consts[i], shape=[1]
                          ),
                      )
                  )
              )
          return output
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import collections
  import pickle
  import os
  import time
  import warnings
  import numpy
  import pandas
  import tensorflow
  import tempfile
  from deepchem.models import Model
  from deepchem.metrics import from_one_hot
  from deepchem.nn import model_ops
  from deepchem.models.tensorflow_models import utils
  from deepchem.trans import undo_transforms
  from deepchem.utils.save import log
  from deepchem.utils.evaluate import Evaluator
  from deepchem.data import pad_features
  from tensorflow.contrib.layers.python.layers import batch_norm
label_desc: Use image node_id 1 for calling the TensorflowMultiTaskRegressor obj's underlying member method code with example usage: obj.build(graph, name_scopes, training) and returns: output