birdCLEF_train.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:BirdCLEF2017 作者: kahst 项目源码 文件源码
def calc_loss_multi(prediction, targets):

    #we need to clip predictions when calculating the log-loss
    prediction = T.clip(prediction, 0.0000001, 0.9999999)

    #binary crossentropy is the best choice for a multi-class sigmoid output
    loss = T.mean(objectives.binary_crossentropy(prediction, targets))

    return loss

#theano variable for the class targets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号