Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Machine learning 多标签交叉熵_Machine Learning_Neural Network_Multilabel Classification - Fatal编程技术网

Machine learning 多标签交叉熵

Machine learning 多标签交叉熵,machine-learning,neural-network,multilabel-classification,Machine Learning,Neural Network,Multilabel Classification,其中一个答案中存在交叉熵:,即: 为什么这是明确的多标签?它看起来很像单变量(单类)分类的对数损失。我在文献中发现了这个 # custom loss: multi label cross entropy def multilabel_objective(predictions, targets): epsilon = np.float32(1.0e-6) one = np.float32(1.0) pred = T.clip(predictions, epsilon, o

其中一个答案中存在交叉熵:,即:

为什么这是明确的多标签?它看起来很像单变量(单类)分类的对数损失。我在文献中发现了这个

# custom loss: multi label cross entropy
def multilabel_objective(predictions, targets):
    epsilon = np.float32(1.0e-6)
    one = np.float32(1.0)
    pred = T.clip(predictions, epsilon, one - epsilon)
    return -T.sum(targets * T.log(pred) + (one - targets) * T.log(one - pred), axis=1)