回答

3

它採用L2損失(均方差)爲target_column.py定義:

def regression_target(label_name=None, 
         weight_column_name=None, 
         target_dimension=1): 
    """Creates a _TargetColumn for linear regression. 
    Args: 
    label_name: String, name of the key in label dict. Can be null if label 
     is a tensor (single headed models). 
    weight_column_name: A string defining feature column name representing 
     weights. It is used to down weight or boost examples during training. It 
     will be multiplied by the loss of the example. 
    target_dimension: dimension of the target for multilabels. 
    Returns: 
    An instance of _TargetColumn 
    """ 
    return _RegressionTargetColumn(loss_fn=_mean_squared_loss, 
           label_name=label_name, 
           weight_column_name=weight_column_name, 
           target_dimension=target_dimension) 

,目前API不支持這裏的任何變化。然而,由於它是開源的 - 你可以隨時修改構造函數以在內部調用不同的函數,並且會有不同的損失。