parameters: (self)
docstring: Creates tensor to cache id maps.
docstring_summary: Creates tensor to cache id maps.
docstring_tokens: Creates tensor to cache id maps .
function: def _create_tensor_maps(self):
      """Creates tensor to cache id maps."""
      self.tensorname_to_cache_idx = {}
      self.cache_idx_to_tensor_idx = []
      for out_tensor in self.traced_tensors:
        tensor_name = out_tensor.name
        if tensor_name in self.tensorname_to_cache_idx:
          raise ValueError(
              'Tensor name %s should not be already in '
              'tensorname_to_cache_idx'%tensor_name)
        if tensor_name not in self.graph_order.tensor_to_idx:
          raise ValueError(
              'Tensor name %s is not in the tensor_to_idx'%tensor_name)
        tensor_idx = self.graph_order.tensor_to_idx[tensor_name]
        cache_idx = len(self.tensorname_to_cache_idx)
        self.tensorname_to_cache_idx[tensor_name] = cache_idx
        self.cache_idx_to_tensor_idx.append(tensor_idx)
        if len(self.tensorname_to_cache_idx) != len(
            self.cache_idx_to_tensor_idx):
          raise RuntimeError('len(self.tensorname_to_cache_idx) != '
                             'len(self.cache_idx_to_tensor_idx')
function_tokens: def _create_tensor_maps ( self ) : self . tensorname_to_cache_idx = { } self . cache_idx_to_tensor_idx = [ ] for out_tensor in self . traced_tensors : tensor_name = out_tensor . name if tensor_name in self . tensorname_to_cache_idx : raise ValueError ( 'Tensor name %s should not be already in ' 'tensorname_to_cache_idx' % tensor_name ) if tensor_name not in self . graph_order . tensor_to_idx : raise ValueError ( 'Tensor name %s is not in the tensor_to_idx' % tensor_name ) tensor_idx = self . graph_order . tensor_to_idx [ tensor_name ] cache_idx = len ( self . tensorname_to_cache_idx ) self . tensorname_to_cache_idx [ tensor_name ] = cache_idx self . cache_idx_to_tensor_idx . append ( tensor_idx ) if len ( self . tensorname_to_cache_idx ) != len ( self . cache_idx_to_tensor_idx ) : raise RuntimeError ( 'len(self.tensorname_to_cache_idx) != ' 'len(self.cache_idx_to_tensor_idx' )