class_docstr: Defines how the inputs, hidden layers, and outputs are connected.
  
  This represents the architecture of a NN by a sequence with this pattern:
  
  (Layer 0)_______
  |InputSelector  |
  |Combiner       | (Node 0)
  |Block__________|
  (Layer 1)_______
  |InputSelector  |
  |Combiner       | (Node 1)
  |Block__________|
  (Layer 2)_______
  |InputSelector  |
  |Combiner       | (Node 2)
  |Block__________|
  (Layer 3)
  .
  .
  .
  (Layer d)
  
  Since every InputSelector has access to all preceding layers, we can represent
  any arbitrary DAG. To obtain the adjacency matrix, we can traverse the
  sequence and concatentate the InputSelectors' outputs.
class_docstr_tok: ["Defines","how","the","inputs",",","hidden","layers",",","and","outputs","are","connected",".","This","represents","the","architecture","of","a","NN","by","a","sequence","with","this","pattern",":","(","Layer","0",")","_______","|InputSelector","|","|Combiner","|","(","Node","0",")","|Block__________|","(","Layer","1",")","_______","|InputSelector","|","|Combiner","|","(","Node","1",")","|Block__________|","(","Layer","2",")","_______","|InputSelector","|","|Combiner","|","(","Node","2",")","|Block__________|","(","Layer","3",")",".",".",".","(","Layer","d",")","Since","every","InputSelector","has","access","to","all","preceding","layers",",","we","can","represent","any","arbitrary","DAG",".","To","obtain","the","adjacency","matrix",",","we","can","traverse","the","sequence","and","concatentate","the","InputSelectors","'","outputs","."]
docstr: Creates the variables in the tf.Graph.
  
  Helps in saving the architecture to from Checkpoint. This does not save the
  computation graph or trainable variables themselves, only the high-level
  structure.
code: def save_to_graph(self):
      """Creates the variables in the tf.Graph.
  
      Helps in saving the architecture to from Checkpoint. This does not save the
      computation graph or trainable variables themselves, only the high-level
      structure.
      """
      input_indices_padded_name = "architectures/{}/{}".format(
          self.tower_name, INPUT_INDICES_PADDED_TENSOR_NAME
      )
      input_indices_lengths_name = "architectures/{}/{}".format(
          self.tower_name, INPUT_INDICES_LENGTHS_TENSOR_NAME
      )
      combiner_types_name = "architectures/{}/{}".format(
          self.tower_name, COMBINER_TYPES_TENSOR_NAME
      )
      block_types_name = "architectures/{}/{}".format(
          self.tower_name, BLOCK_TYPES_TENSOR_NAME
      )
      input_keys_name = "architectures/{}/{}".format(
          self.tower_name, INPUT_KEYS_TENSOR_NAME
      )
  
      input_indices_max_length = max(
          len(node.input_indices) for node in self.node_list
      )
      input_indices_padded_list = []
      input_indices_lengths = []
      combiner_types = []
      block_types = []
      for node in self.node_list:
          input_indices_padded = [0] * input_indices_max_length
          for i, input_index in enumerate(node.input_indices):
              input_indices_padded[i] = input_index
          input_indices_padded_list.append(input_indices_padded)
          input_indices_lengths.append(len(node.input_indices))
          combiner_types.append(node.combiner_type)
          block_types.append(node.block_type)
  
      tf.compat.v1.get_variable(
          name=input_indices_padded_name,
          shape=[len(self.node_list), input_indices_max_length],
          trainable=False,
          initializer=tf.compat.v1.constant_initializer(
              input_indices_padded_list
          ),
          dtype=tf.int32,
      )
  
      tf.compat.v1.get_variable(
          name=input_indices_lengths_name,
          shape=[len(self.node_list)],
          trainable=False,
          initializer=tf.compat.v1.constant_initializer(
              input_indices_lengths
          ),
          dtype=tf.int32,
      )
  
      tf.compat.v1.get_variable(
          name=combiner_types_name,
          shape=[len(self.node_list)],
          trainable=False,
          initializer=tf.compat.v1.constant_initializer(combiner_types),
          dtype=tf.int32,
      )
  
      tf.compat.v1.get_variable(
          name=block_types_name,
          shape=[len(self.node_list)],
          trainable=False,
          initializer=tf.compat.v1.constant_initializer(block_types),
          dtype=tf.int32,
      )
  
      tf.compat.v1.get_variable(
          name=input_keys_name,
          shape=[len(self.input_keys) if self.input_keys else 0],
          trainable=False,
          initializer=tf.compat.v1.constant_initializer(
              self.input_keys or []
          ),
          dtype=tf.string,
      )
  
imports: import abc
  import collections
  import enum
  import time
  from absl import logging
  from model_search import block_builder
  from model_search import utils
  from model_search.architecture import architecture_utils
  from model_search.proto import phoenix_spec_pb2
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling the Architecture obj's underlying member method code with example usage: obj.save_to_graph() without return types