예제 #1
0
def build_objective(interface_layers):
    # l2 regu on certain layers
    l2_penalty = nn.regularization.regularize_layer_params_weighted(
        interface_layers["regularizable"], nn.regularization.l2)
    # build objective
    return objectives.LogLossObjective(interface_layers["outputs"],
                                       penalty=l2_penalty)
예제 #2
0
def build_objective(l_ins, l_outs):
    return objectives.LogLossObjective(l_outs)