Code Monkey home page Code Monkey logo

triplet-loss's People

Contributors

wujiyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

triplet-loss's Issues

关于求梯度的问题

@wuyiyang
你好,为什么下面两个分支,求梯度使用的公式不一样呢?
loss=f(a).f(n) - f(a).f(p)
ori_diff = f(n) - f(p)
pos_diff = -f(p)
neg_diff= f(a) 所以loss1的计算没有问题,
那loss2>0时的的算式时怎么来的呢?
谢谢
if(tloss1 > 0)
{
for(int k = 0; k < dim; k ++)
{
fori_diff[k] += (fneg[k] - fpos[k]); // / (pairNum * 1.0 - 2.0);
fpos_diff[k] += -fori[k]; // / (pairNum * 1.0 - 2.0);
fneg_diff[k] += fori[k];
}
}
if(tloss2 > 0)
{
for(int k = 0; k < dim; k ++)
{
fori_diff[k] += -fpos[k]; // / (pairNum * 1.0 - 2.0);
fpos_diff[k] += fneg[k]-fori[k]; // / (pairNum * 1.0 - 2.0);
fneg_diff[k] += fpos[k];
}
}

使用casia_webface作为训练集 无法收敛的问题

您好! 我使用casia_webface作为训练集,在resnet101上训练无法收敛,于是改用您在example里的网络结构,也无法收敛,loss一直在0.05上下震荡,这是我的solver文件:
image
会是学习率设置过大的原因吗,请问您训练的时候用的solver参数是什么呢?

怎么准备训练数据?

@wujiyang 感谢你的分享,我在试着自己训练模型。
我下载的CASIA-WebFace训练集是没有处理过的, 训练前需要做裁剪和对齐处理吗?还是直接用原始图片就可以?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.