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)
def build_objective(l_ins, l_outs): return objectives.LogLossObjective(l_outs)