pytorch 一些 Loss Function
2017-11-06 16:52
453 查看
nn.L1Loss()
loss(x,y) = 1/n ∑ |xi - yi| n是元素的总个数
shape:
input: (N,) 是任何额外的维度
target: (N,*) same as input
output: scalar ,标量
nnMSELoss()
loss(x,y) =1/n ∑(xi-yi)²
shape:
input: (N,*)
target: (N,*)
output: scalar
nn.CrossEntropyLoss()
单目标二分类或者多分类
loss = -log[ exp(x[class])/ (∑ exp( x[j]))]
shape:
input: (N,C) C = number of classes
target : (N)
NN.BCELoss()
单目标二分类交叉熵函数,Binary_Corss_Entropy
loss = -1/n ∑{ t[i]*log(o[i])-(1-t[i]) *log(1-o[i])} i = 0,1
shape:
input: (N,*)
output: (N,*)
loss(x,y) = 1/n ∑ |xi - yi| n是元素的总个数
shape:
input: (N,) 是任何额外的维度
target: (N,*) same as input
output: scalar ,标量
nnMSELoss()
loss(x,y) =1/n ∑(xi-yi)²
shape:
input: (N,*)
target: (N,*)
output: scalar
nn.CrossEntropyLoss()
单目标二分类或者多分类
loss = -log[ exp(x[class])/ (∑ exp( x[j]))]
shape:
input: (N,C) C = number of classes
target : (N)
NN.BCELoss()
单目标二分类交叉熵函数,Binary_Corss_Entropy
loss = -1/n ∑{ t[i]*log(o[i])-(1-t[i]) *log(1-o[i])} i = 0,1
shape:
input: (N,*)
output: (N,*)
相关文章推荐
- pytorch使用过程中遇到的一些问题
- pytorch里一些函数的说明记录
- PyTorch:Mark一下找到的一些入门资源合集
- pytorch学习_1
- pytorch学习-数据可视化
- Pytorch打怪路(一)pytorch进行CIFAR-10分类(1)CIFAR-10数据加载和处理
- Pytorch打怪路(一)pytorch进行CIFAR-10分类(5)测试
- pytorch加载已训练好的word-embedding
- 吐血整理:PyTorch项目代码与资源列表 | 资源下载
- python manage.py shell之后的一些错误:
- 荐书丨深度学习入门之PyTorch
- PyTorch快速入门教程四(cnn:卷积神经网络 )
- pytorch使用(二)自定义网络
- pytorch GAN生成对抗网络
- pytorch中的pre-train函数模型或者旧的模型的引用及修改(增减网络层,修改某层参数等) finetune微调等
- PyTorch快速搭建神经网络及其保存提取方法详解
- pytorch入门教程(一):Tensor###tensor好好好####
- torch入门笔记19:关于一些torch博客的索引
- pytorch + visdom CNN处理自建图片数据集的方法
- Pytorch是什么?关于Pytorch!