models.py 文件源码

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

项目:sk-torch 作者: mattHawthorn 项目源码 文件源码
def forward(self, activations, targets):
        # targets are -1.0 or 1.0, 1-d Variable
        # likelihood assigned by the model to pos and neg samples is given by the sigmoid, with the sign
        # determined by the class.
        # negative log likelihood
        return log(sigmoid(activations * targets)).sum() * -1.0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号