layumi / layumi/Image-Text-Embedding

How to avoid overfitting

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MATLAB
Stars
296
Forks
72
PR merge metrics
No merged PRs in 30d

Description

Hello,
ZheDong, thanks for you sharing such a good work. I want to reproduce it in Pytorch,but I'm sorry that I encountered the overfitting problem.
To get the results quickly, I randomly choose 10,000 samples as traindata and 1,000 as valdata, 1,000 as testdata separately. Finally I got about 100% recall@5 on the training set while only half of it on the val data.
And I'm a fresh man to ImageTextEmbedding,could you share some solutions to that. I guess there are relevant reasons:

  1. Data normalization. I don't compute the mean and var of train_data explicitly, and just divide it by 255, subtract 0.5, and thendivide it by 0.5

  2. L2 regularization. I just use the 1e-5 regularization intensity

  3. The complexity of classifier. After generator, I add a classifier with a softmax layer directly. Whether more fully connection layers can slow down the fitting of the training set

Finally, I want to ask how to mine the hard triplet online in Pytorch efficiently.

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is identified. Start by reviewing the PyTorch training setup and the stated train, validation, and test split, then establish what change would address the reported overfitting and how online hard-triplet mining should be evaluated.

Written by the indexing model from the issue text.

Assessment

Tech stack
pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.