Comments (7)
多谢您的关注!
这里global和local的矩阵都可以拿来做mutual learning,可以选择性用哪一个,参见这里和这里。
from alignedreid-re-production-pytorch.
hi , do you know what is the zero gradient in the paper (3) ?
and your code in the train_ml.py , line 519
Global Distance Mutual Loss (L2 Loss)
gdm_loss = 0
if (cfg.num_models > 1) and (cfg.gdm_loss_weight > 0):
for j in range(cfg.num_models):
if j != i:
gdm_loss += torch.sum(torch.pow(
g_dist_mat - TVT(g_dist_mat_list[j]).detach(), 2))
gdm_loss /= 1. * (cfg.num_models - 1) * len(ims) * len(ims)
I can't understand " g_dist_mat" and " TVT(g_dist_mat_list[j]).detach()" .
if the "TVT(g_dist_mat_list[j]).detach() " is the zero gradient , than what do you do ?
thanks
from alignedreid-re-production-pytorch.
Hi, yes, detach
is my understanding of zero gradient
in the paper. When .detach()
is applied to a Variable
, it returns a new Variable
that is a leaf node and stops gradients through itself.
from alignedreid-re-production-pytorch.
could you explain again with 中文? what is the zero gradient ?
thanks you
from alignedreid-re-production-pytorch.
我理解的zero gradient的意思是梯度传到那里就不往下传了,所以这里可以用Variable的detach method来实现。
from alignedreid-re-production-pytorch.
this is mean the mutual loss don't backpropagation, only metric loss do backpropagation
from alignedreid-re-production-pytorch.
@Phoebe-star 你好,我是论文一作,zero grad是指把这个变量当常数来看,原版论文使用了megvii的框架,Pytorch没有这个operator,Pytorch可以用detach来实现
from alignedreid-re-production-pytorch.
Related Issues (20)
- top-k结果可视化 HOT 2
- CUHK03和DUKE上的识别率 HOT 1
- How to inference my own test set
- Keys not found in source state_dict HOT 1
- Global Feature Extraction HOT 1
- Local feature dimensions
- About performance on market1501 for global learning and mutual learning
- Is it generalised
- TypeError: __init__() got an unexpected keyword argument 'log_dir'
- AssertionError HOT 3
- 请问论文中的Resnet50-Xception结构是不是没有实现? HOT 1
- 论文复现的参数问题
- how to use the test data to draw picture just like roc missrate cmc?
- How to use without GPU? HOT 2
- could you send me a partitions.pkl about market1501 HOT 1
- 为啥用你提供的weight测得market也只有88.78的top1呢 HOT 1
- how to infer some images or videos
- RuntimeError: cannot perform reduction function min on tensor with no elements because the operation does not have an identity
- Poor performnace when reproducing evaluation on market1501 HOT 2
- would you help me to fix this error?
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 alignedreid-re-production-pytorch.