#Oss

caffe实现focal loss层的一些理解和对实现一个layer层易犯错的地方的总结

 首先要在caffe.proto中的LayerParameter中增加一行optionalFocalLossParameterfocal_loss_param=205;,然后再单独在caffe.proto中增加messageFocalLossParameter{       optionalfloa...

整个ssd的网络和multibox_loss_layer

总结说来prior_box层只完成了一个提取anchor的过程,其他与gt的match,筛选正负样本比例都是在multibox_loss_layer完成的 http://www.360doc.com/content/17/0810/10/10408243_678091430.shtml 1.以mob...

L1 loss L2 loss

https://www.letslearnai.com/2018/03/10/what-are-l1-and-l2-loss-functions.htmlhttp://rishy.github.io/ml/2015/07/28/l1-vs-l2-loss/ L1-lossL2-lossL1loss感觉和L1范...
代码星球 代码星球·2020-10-13

euclidean loss

个人感觉相当于L2范式开平方,也相当于针对两个向量的欧氏距离开平方说的更直白点就是两个向量对应位置相减得到每个位置的差,然后把每个位置的差开平方再相加前向传播cpp代码:template<typenameDtype>voidEuclideanLossLayer<Dtype>::Forward_c...
代码星球 代码星球·2020-10-13

softmax_loss的归一化问题

cnn网络中,网络更新一次参数是根据loss反向传播来,这个loss是一个batch_size的图像前向传播得到的loss和除以batch_size大小得到的平均loss。softmax_loss前向传播中有这样一段代码:   loss/get_normalizer(normalizati...
代码星球 代码星球·2020-10-13

softmax_loss.cu 和 softmax_loss.cpp源码

 1#include<algorithm>2#include<cfloat>3#include<vector>45#include"caffe/layers/softmax_loss_layer.hpp"6#include"caffe/util/math_functions...

softmax_loss

softmax_loss中的ignore_label是来自于losslayer,而不是softmax_loss的参数...
代码星球 代码星球·2020-10-13

自己写的画loss曲线代码

 importmatplotlib.pyplotaspltiteration=[]loss=[]withopen('/home/sensetime/log.txt','r')asfile:forlineinfile:line=line.strip()if(line.find('Iteration')!=-1)...

smooth_L1_loss_layer.cu解读 caffe源码初认识

.cpp是cpu上运行的代码,.cu是gpu上运行的代码。这是smooth_L1_loss_layer.cu的前向传播部分#include"caffe/fast_rcnn_layers.hpp"namespacecaffe{template<typenameDtype>__global__voidSmoot...

交叉熵cross entropy和相对熵(kl散度)

交叉熵可在神经网络(机器学习)中作为损失函数,p表示真实标记的分布,q则为训练后的模型的预测标记分布,交叉熵损失函数可以衡量真实分布p与当前训练得到的概率分布q有多么大的差异。相对熵(relativeentropy)就是KL散度(Kullback–Leiblerdivergence),用于衡量两个概率分布之间的差异。对...

绘制loss曲线

第一步保存日志文件,用重定向即可:$TOOLS/caffetrain--solver=$SOLVERFILE2>&1|teeout.log第二步直接绘制:pythonplot_training_log.py2testloss.pngout.log这个plot_training_log.py在这个目录下ca...
代码星球 代码星球·2020-10-12

用fast rcnn绘制loss曲线遇到的问题

运行fastrcnn的train,会进入ipython,要先exit退出才能继续运行程序绘制图像时,用了命令:./tools/train_net.py--gpu0--solvermodels/VGG_CNN_M_1024/solver.prototxt--weightsdata/fast_rcnn_models/vgg...

一篇博客:分类模型的 Loss 为什么使用 cross entropy 而不是 classification error 或 squared error

https://zhuanlan.zhihu.com/p/26268559分类问题的目标变量是离散的,而回归是连续的数值。分类问题,都用onehot+crossentropytraining过程中,分类问题用crossentropy,回归问题用meansquarederror。training之后,validation...

Softmax vs. Softmax-Loss: Numerical Stability

http://freemind.pluskid.org/machine-learning/softmax-vs-softmax-loss-numerical-stability/softmax在LogisticRegression里起到的作用是将线性预测值转化为类别概率1.最大似然估计通常使用log-likelihoo...
首页上一页...56789...下一页尾页