Пример #1
0
def svm_loss_with_label(input_symbol: Symbol, classification, get_label_symbol: bool=False):
    class_matrix = generate_label_matrix(classification)[0]
    return svm_loss(input_symbol, class_matrix, get_label_symbol)
Пример #2
0
def svm_loss_with_label(input_symbol: Symbol, classification):
    label_symbol = Constant(generate_label_matrix(classification)[0])
    return svm_loss(input_symbol, label_symbol)