INNER CODE UNIT · Python

construct_graph

deepchem/deepchem · contrib/tensorflow_models/__init__.py:231

  def construct_graph(self, training, seed):
    """Returns a TensorflowGraph object."""
    graph = tf.Graph()

    # Lazily created by _get_shared_session().
    shared_session = None

    # Cache of TensorFlow scopes, to prevent '_1' appended scope names
    # when subclass-overridden methods use the same scopes.
    name_scopes = {}

    # Setup graph
    with graph.as_default():
      if seed is not None:
        tf.set_random_seed(seed)
      (output, labels, weights) = self.build(graph, name_scopes, training)

    if training:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…