Comments (17)
同问,最近做了finetune发现效果由逐渐变好到逐渐变差,一开始ap是小于an的并且差距逐渐变大,后来ap和an就变得接近了。
from tripletloss.
Hi
我用triplet finetune的时候呢 学习率取的0.005
看起来收敛还可以的样子 ap和an的差距越来越大 不过现在还没跑完
就是不知道差距到什么样子可以停止训练
还是后面会保持不变?
from tripletloss.
保险的话可以每隔几段iterations就存一下model,这个还真不好说,因为我跑到最后是变差的。每个人情况不同吧~对了我做的不是人脸,是印刷体汉字~
from tripletloss.
@thu-zxs 请通过最近的propsal进行finetune。
之前给的工程会出现所述的问题,个人感觉是因为梯度并没有回传,原先的model已经把距离分开来,但是由于参数的decay,造成最终参数会变0,在这个过程中会产生你所述的情况,最后变差是所有的样本输出都是0了,所以loss会为0.1
from tripletloss.
@pinguo-luhaofang 好的,我会继续尝试,谢谢!
from tripletloss.
@yzk0281 loss就是模型的训练收敛程度的指标啊。
from tripletloss.
阿。。。不会吧
我怎么看到loss值在triplet finetune的时候变化很小
但是ap和an的差距倒是逐渐增大的
from tripletloss.
@yzk0281 ap和an距离拉大了,loss不可能不会降低的
from tripletloss.
额。。也就是说看ap和an的差距变化也是可以的么
from tripletloss.
@pinguo-luhaofang
我再仔细读了一下您的代码,发现tripletselect中的backward是对不满足 aps[i][1] >= ans[i][1]的triplet反传梯度,这应该不对吧?
如理解有误,还请明示~
from tripletloss.
@thu-zxs 是的,就是对不满足aps[i][1] >= ans[i][1]的triplet反传梯度,回传满足aps[i][1] < ans[i][1]的triplet梯度。
from tripletloss.
嗯,方便问问其中的道理?我直观上看,不反传aps[i][1] >= ans[i][1]的样本对的梯度的话,那这个样本对不就得不到训练了?
from tripletloss.
产生梯度的是 0 < an - ap < margin 的样本对,详情请参见论文。
from tripletloss.
好的谢谢@pinguo-luhaofang
from tripletloss.
如果ap 〉 an的话 ,就是说正样本的距离比负样本还大,那样不是更应该训练么 ?
from tripletloss.
@yzk0281 如果aps[i][1] > ans[i][1],那么其实选出来的这个三元组是没有意义的,所以不能回传。我是这么理解的 不知道对不对
from tripletloss.
@tanyuan1992 为何没有意义?
from tripletloss.
Related Issues (20)
- the module name is right,but it still failed with boost::python::error_already_set
- 训练到后面 loss都变为0.1 an,ap变为0 HOT 6
- training problem HOT 5
- training problem
- Hard Sample
- the triplet loss architecture is unsupervised, is this correct?
- tipletselectlayer - computing the distance against the anchor image HOT 2
- shuffle
- fc9_1 weights is increase with the train iterations from 0.0x to 40.x HOT 1
- Training your code on custom dataset HOT 1
- how to train it on 2 gpus
- Use of the margin HOT 2
- Negative mining in TripletSelectLayer HOT 1
- what does no_residual_list for?
- 数据集组织需要什么特别处理么? HOT 1
- online triplet sample selection usage?
- 您好,我想用自己的数据集跑这个网络,除了修改config路径,还需要修改哪里? HOT 2
- Online triplet generation HOT 1
- 工作推荐
- ap,an都变得特别大
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 tripletloss.