Git Product home page Git Product logo

Comments (3)

fartashf avatar fartashf commented on June 26, 2024

About start and end tokens, I guess in the current implementation they are not really useful. They are useful if the implementation of sentence encoder can't handle variable lengths in a mini-batch or if it is not parallelized over a mini-batch. But it's not the case in this with the pytorch tools used.

It is true that the validation set can have effectively 1000 images in it. But the small validation set is only used for early stopping. So maybe as a result we don't choose the best model for test set.

from vsepp.

muaz1994 avatar muaz1994 commented on June 26, 2024

@fartashf Thanks a lot for your reply. I have one more question and I would really appreciate a reply. I have a deeper network for embedding the visual and text features, based on your code (just added more layers). Consider it to be 3 layers for each modality. I am using a ReLU activation function in between all these layers, except for the last one which will be the input to the similarity function. I found out that the results are extremely horrible (0.1, 0.5, 0.3) for R@1, R@5, R@10. But it works well when I remove the ReLU activation between the layers. Any idea why non-linearity harms image-text retrieval?

from vsepp.

fartashf avatar fartashf commented on June 26, 2024

Maybe consider these changes:

  • Try the sum loss first. Max loss is not always good at the beginning of the optimization.
  • Make sure initialization is done correctly. Weights are not too small or too large.
  • Make sure fine-tuning is not set.
  • Try adding layers to only one modality. See if the problem is with training both together.
  • Try adding normalization before each linear layer.

from vsepp.

Related Issues (20)

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.