Comments (15)
@xialuxi @zys1994 Hi, how do you set the wing loss parameter? I have set the landmark label to [-1,1]. And I have set the wing loss parameter (w=0.3, e=2), it does not converge. As follow is the author suggestion.
I need python caffe version of wingloss
You can normalise the label to [0,1], but then you have to change the wing loss parameters and learning rate as well. I used a label in [0,64] for CNN6 and I did not normalise the wing loss by the number of batch size
from arcface-caffe.
(w=10,e=2) is fine
from arcface-caffe.
@xialuxi @briantse100
how to use Wingloss? when i use WingLoss layer like this
layer {
name: "landmarkloss"
type: "WingLoss"
bottom: "fc4"
bottom: "hdf_data"
top: "landmarkloss"
loss_weight: 1
include {
phase: TRAIN
}
wing_loss_param{
w: 10
epsilon: 2
}
}
when i train,it makes wrong
*** Aborted at 1561083953 (unix time) try "date -d @1561083953" if you are using GNU date ***
PC: @ 0x7f32043cfa9e (unknown)
*** SIGSEGV (@0x10514f09c00) received by PID 20569 (TID 0x7f3206ffbac0) from PID 351312896; stack trace: ***
@ 0x7f32042924b0 (unknown)
@ 0x7f32043cfa9e (unknown)
@ 0x7f320630a8b0 caffe::WingLossLayer<>::Forward_gpu()
@ 0x7f320615bbc1 caffe::Net<>::ForwardFromTo()
@ 0x7f320615bcc7 caffe::Net<>::Forward()
@ 0x7f32062e1ee8 caffe::Solver<>::Step()
@ 0x7f32062e2a8a caffe::Solver<>::Solve()
@ 0x40e54b train()
@ 0x40a6dd main
@ 0x7f320427d830 __libc_start_main
@ 0x40b139 _start
@ 0x0 (unknown)
^C
from arcface-caffe.
你试一下使用cpu模式,看正不正常?
from arcface-caffe.
cpu目前可以train,不过速度很慢 。 gpu版本是出了什么问题吗
from arcface-caffe.
等我有时间了改一下就好了。
from arcface-caffe.
@zys1994, 可以参考faster-rcnn中的smoothL1loss。
from arcface-caffe.
WingLossForward 里面这样写会存在问题,gpu多线程对同一个变量操作了。
from arcface-caffe.
将输出Dtype* out 改成, blob结构, 算完之后,再相加!
from arcface-caffe.
cpu train了半天才6000个batch。期待你把gpu版本的改好来训 哈哈
from arcface-caffe.
1, 你可以使用gpu训练, 只要把loss层的gpu代码屏蔽掉就行了,训练速度影响很小。
2、我稍微修改了下代码, 但是我没有测试,你可以自己试一试。
from arcface-caffe.
make all -j 的时候报错了
src/caffe/layers/wing_loss_layer.cpp:28:47: error: ‘one_dot_data’ was not declared in this scope
void WingLossLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top)
{
w = this->layer_param_.wing_loss_param().w();
DCHECK(w > 0);
epsilon = this->layer_param_.wing_loss_param().epsilon();
DCHECK(epsilon >= 0);
//_c = w * (1.0 - log(1.0 + w/epsilon)
_c = w * (1.0 - log(1.0 + w/epsilon));
// has_ignore_label_ = this->layer_param_.loss_param().has_ignore_label();
// if (has_ignore_label_)
// {
// ignore_label_ = this->layer_param_.loss_param().ignore_label();
// }
log_abs.ReshapeLike(*bottom[0]);
caffe_set(bottom[0]->count(), Dtype(1.0), one_dot_data);
}
这里面最后一句的one_dot_data在哪声明
from arcface-caffe.
from arcface-caffe.
改了之后make可以通过, 但用cpu,gpu 在train都会报错
用EuclideanLoss是可以跑的,应该还是Wingloss有点问题
F0622 10:32:27.929319 17830 blob.cpp:133] Check failed: data_
*** Check failure stack trace: ***
@ 0x7f44f71c15cd google::LogMessage::Fail()
@ 0x7f44f71c3433 google::LogMessage::SendToLog()
@ 0x7f44f71c115b google::LogMessage::Flush()
@ 0x7f44f71c3e1e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f44f79bf5eb caffe::Blob<>::mutable_cpu_data()
@ 0x7f44f798a60d caffe::WingLossLayer<>::LayerSetUp()
@ 0x7f44f7845027 caffe::Net<>::Init()
@ 0x7f44f784776e caffe::Net<>::Net()
@ 0x7f44f79b735a caffe::Solver<>::InitTrainNet()
@ 0x7f44f79b8825 caffe::Solver<>::Init()
@ 0x7f44f79b8b3f caffe::Solver<>::Solver()
@ 0x7f44f79aaaf1 caffe::Creator_AdamSolver<>()
@ 0x40d98a train()
@ 0x40a6dd main
@ 0x7f44f5957830 __libc_start_main
@ 0x40b139 _start
@ (nil) (unknown)
from arcface-caffe.
@xialuxi 目前在用wingloss train的时候报错可以帮忙看看吗?
from arcface-caffe.
Related Issues (20)
- 训练时loss损失一直不变,希望指点一下 HOT 3
- AdaCos的问题 HOT 3
- The Predictions of Landmarks is not accurate at all HOT 1
- UMDFaces Dataset
- SV-X-Softmax的.cu文件
- 关于cosin_add_m_layer的实现 HOT 1
- 我使用softmax损失,10177个id, 20万张图片,loss从开始50左右,训练10个epoch后下降到19左右就在一直震荡,请问你们训练时这么大的数据集loss能下降到多少?而且准确率也不会提升。 HOT 8
- mnist的例子
- 关于CosinAddmLayer和combined_margin_layer的疑问
- softmax计算
- Did anyone try AdaCos? HOT 2
- 为什么loss为87.33,accuracy为1? HOT 2
- 关于adacos中的m HOT 1
- Compile on ubuntu
- Optimizer
- 训练过程精度较高,测试的时候精度确不高?
- 卷积层是否使用偏置 bias_term
- pose = pose * 90.0是出来的pose要旋转的意思吗?
- accuracy_hat_arc不超过0.6,损失处于1.5
- Is it mandatory to use Nvidia GPU, can we use OpenCL instead?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcface-caffe.