![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
文章平均质量分 87
Jemila
水火之中
展开
-
tensorflow/keras与pytorch的交叉熵对比
pytorch交叉熵损失BCELoss vs BCEWithLogitsLossbceloss前面需要经过sigmoidBCEWithLogitsLoss就是把Sigmoid-BCELoss合成一步input = torch.tensor(np.arange(3)/3).reshape(3,1)input2 = torch.nn.Sigmoid()(input)loss = torch.nn.BCELoss()target = torch.tensor([[0],[1],[1]]).原创 2021-04-19 17:07:44 · 1677 阅读 · 4 评论 -
安装visdom
官网:https://github.com/facebookresearch/visdom1、假设当前路径/work/ git clonehttps://github.com/facebookresearch/visdom.git-->/work/visdom2、pip install -e /work/visdom3、cd到visdom路径下,修改server.py <...原创 2019-12-05 10:34:13 · 2134 阅读 · 0 评论