parameters: (self)
return_statement: return self._as_tensor
docstring: Returns the overall concatenated value as a `Tensor`.
  
      Returns:
        `Tensor` containing the concatenated value.
docstring_summary: Returns the overall concatenated value as a `Tensor`.
docstring_tokens: Returns the overall concatenated value as a Tensor .
function: def as_tensor(self):
      """Returns the overall concatenated value as a `Tensor`.
  
      Returns:
        `Tensor` containing the concatenated value.
      """
      if self._as_tensor is not None:
        return self._as_tensor
  
      if len(self._variable_list) == 1:
        with ops.name_scope(None):
          self._as_tensor = array_ops.identity(self._variable_list[0],
                                               name=self._name)
          return self._as_tensor
  
      if all([p < 2 for p in self._partitions]):
        partition_ix = 0
      else:
        partition_ix = [i for i, p in enumerate(self._partitions) if p > 1][0]
      with ops.name_scope(self._name + "/ConcatPartitions/"):
        concatenated = array_ops.concat(partition_ix, self._variable_list)
      with ops.name_scope(None):
        # Be sure to cache the concatenated tensor to not do extraneous
        # computations.
        self._as_tensor = array_ops.identity(concatenated, name=self._name)
      return self._as_tensor
function_tokens: def as_tensor ( self ) : if self . _as_tensor is not None : return self . _as_tensor if len ( self . _variable_list ) == 1 : with ops . name_scope ( None ) : self . _as_tensor = array_ops . identity ( self . _variable_list [ 0 ] , name = self . _name ) return self . _as_tensor if all ( [ p < 2 for p in self . _partitions ] ) : partition_ix = 0 else : partition_ix = [ i for i , p in enumerate ( self . _partitions ) if p > 1 ] [ 0 ] with ops . name_scope ( self . _name + "/ConcatPartitions/" ) : concatenated = array_ops . concat ( partition_ix , self . _variable_list ) with ops . name_scope ( None ) : # Be sure to cache the concatenated tensor to not do extraneous # computations. self . _as_tensor = array_ops . identity ( concatenated , name = self . _name ) return self . _as_tensor