parameters: (self,
                        input_tensor,
                        num_outputs=1,
                        weight_collections=None,
                        trainable=True)
return_statement: return log_odds_by_dim, [weight]
docstring: Returns a Tensor as linear predictions and a list of created Variable.
docstring_summary: Returns a Tensor as linear predictions and a list of created Variable.
docstring_tokens: Returns a Tensor as linear predictions and a list of created Variable .
function: def to_weighted_sum(self,
                        input_tensor,
                        num_outputs=1,
                        weight_collections=None,
                        trainable=True):
      """Returns a Tensor as linear predictions and a list of created Variable."""
      def _weight(name):
        return variable_scope.get_variable(
            name,
            shape=[self.dimension, num_outputs],
            initializer=array_ops.zeros_initializer,
            collections=_add_variable_collection(weight_collections))
  
      if self.name:
        with variable_scope.variable_op_scope([input_tensor], None, self.name):
          weight = _weight("weight")
      else:
        # Old behavior to support a subset of old checkpoints.
        weight = _weight("_weight")
  
      # The _RealValuedColumn has the shape of [batch_size, column.dimension].
      log_odds_by_dim = math_ops.matmul(input_tensor, weight)
      return log_odds_by_dim, [weight]
function_tokens: def to_weighted_sum ( self , input_tensor , num_outputs = 1 , weight_collections = None , trainable = True ) : def _weight ( name ) : return variable_scope . get_variable ( name , shape = [ self . dimension , num_outputs ] , initializer = array_ops . zeros_initializer , collections = _add_variable_collection ( weight_collections ) ) if self . name : with variable_scope . variable_op_scope ( [ input_tensor ] , None , self . name ) : weight = _weight ( "weight" ) else : # Old behavior to support a subset of old checkpoints. weight = _weight ( "_weight" ) # The _RealValuedColumn has the shape of [batch_size, column.dimension]. log_odds_by_dim = math_ops . matmul ( input_tensor , weight ) return log_odds_by_dim , [ weight ]