hsmyy / centerloss_caffe_mnist Goto Github PK
View Code? Open in Web Editor NEWIt's the script of Center loss on mnist dataset running on Caffe.
It's the script of Center loss on mnist dataset running on Caffe.
Hi,
这些中心值的初始化是怎么赋值的?(论文上说每次迭代算特征的平均值从而更新Cyi,但好像没说初始化)
3Q!
center_loss的公式中有一个参数lamda,即lamda/2sum(f(x,c)),请问,参数lamda对应于代码中那个变量呢?
您代码中似乎没有出现这个参数哦.
loss += caffe_cpu_dot(channels, center_loss_.cpu_data() + i * channels,
center_loss_.cpu_data() + ichannels) / Dtype(2.0) / static_cast(num)
另外,这个参数应该设置为多少呢,谢谢
请问你在调试过程中有出现,delta_c数量级为10^(-15)左右,几乎为0,c几乎不被更新,只依赖于第一个batch计算的类中心这种情况吗?谢谢!
我也实现了一版caffe的centerloss 发现centerloss特别小,迭代几论以后就没了的样子,调lamda也一样,你出现过么
是不是初始化为0,在哪里更新的呢?代码中没发现写log呢?
在反向计算中,请问代码中为什么只是将center loss 传回的diff直接copy进bottom的diff中,论文中不应该是加上softmax的梯度一起传回bottom的diff吗?
您的反向传播代码:
Dtype *out = bottom[0]->mutable_cpu_diff();
caffe_copy(num * channels, center_loss_.cpu_data(), out);
这里copy回去了。
请问,如果是二分类,除了将参数cluster_num设置为2以外,其他的两个参数需要更改吗?谢谢
Thanks for sharing your codes! Could you also release the makefile and the caffe version? Thanks!
你好,感谢分享,小弟有一个小疑问。
我目前的理解是feat.log是原来不加centerloss后跑出的ip1特征
而center_feat.log是加了center_loss后跑出的ip1的特征。
然后predict是用生成的model来得到ip1的特征,但是看代码好像只是print了并没有保存成log文件,这里需要自己添加代码完成日志的保存么。谢谢啦
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.