Comments (1)
This is a simplification that in practice does not hurt the training at the scale of MS-COCO.
Particularly, if you look at the loss over the whole mini-batch, the incorrect terms cancel out. In your example, the loss for (i_5, c_19) says I want image i_5 to be closer to c_5 than to c_19 and (i_19, c_5) which is in fact (i_5, c_5) says I want i_5 to be closer to c_19 than to c_5. The gradients from these terms are theoretically exactly the opposite of each other and would cancel out. This is true for both portions of the loss.
Such a simplification would hurt though if the probability of sampling such opposing pairs is high. In that case, the gradient from one mini-batch is accumulated over only a few effective examples and hence the variance of the estimate of the gradient would be high.
Just as a simple test, I tried using a mask to filter out such opposing terms but it did not help.
Besides, this simplification has been typically done in previous work. Take a look at these for example:
https://github.com/ryankiros/visual-semantic-embedding/blob/master/homogeneous_data.py
https://github.com/ryankiros/visual-semantic-embedding/blob/master/datasets.py
from vsepp.
Related Issues (20)
- How to caculate the scores on MSCOCO 1k test images? HOT 3
- Metrics for 1k test images on MS COCO HOT 1
- Loss stuck, not decreasing HOT 2
- The question about loss function HOT 1
- How to build vocab? HOT 2
- Can't reproduce the result using pytorch 0.4.1 branch HOT 3
- questions on dataset construction HOT 3
- encoding data
- about use dataset HOT 1
- Runs file too large HOT 1
- FileNotFoundError when try to reproduce results of pretrained model HOT 1
- train on synthetic dataset HOT 2
- Reproducing results HOT 5
- Same meanr being logged by tb_logger during validation HOT 1
- The number of COCO validation images HOT 1
- loss gap between train and test HOT 1
- Question about your model ? HOT 1
- Where are your model weights stored? HOT 1
- Doubt
- RuntimeError: mat1 and mat2 shapes cannot be multiplied (4608x2048 and 4096x1024) HOT 1
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 vsepp.