我是靠谱客的博主 鲜艳钢笔,这篇文章主要介绍logits 在深度学习中的意思,现在分享给大家,希望可以做个参考。

在卷积神经网络中, x经过激活后,没有经过sigmoid或者softmax处理的"东西",如以下forward函数返回值就是logits

w1, b1 = torch.randn(200, 784, requires_grad=True),
         torch.zero(200, requires_grad=True) #ch_out,ch_in  784=28x28
w2, b2 = torch.randn(200, 200, requires_grad=True),
         torch.zero(200, requires_grad=True)
w3, b3 = torch.randn(10, 200, requires_grad=True),
         torch.zero(200, requires_grad=True)

def forward(x):
    x = x@w1.t() +b1#b1是[200]
    x = F.relu(x)
    x = x@w2.t() + b2
    x = F.relu(x)
    x = x @ w3.t() + b3
    x = F.relu(x)
    return x

最后

以上就是鲜艳钢笔最近收集整理的关于logits 在深度学习中的意思的全部内容,更多相关logits内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(120)

评论列表共有 0 条评论

立即
投稿
返回
顶部