Coder Social home page Coder Social logo

Comments (10)

caoyue10 avatar caoyue10 commented on June 3, 2024

from cvpr17-dvsq.

zhangzeng97 avatar zhangzeng97 commented on June 3, 2024

Hi Cao Yue,

Great thanks for your fast reply!

I have looked into that and it helps a lot.

Best,
Zhang Zeng

from cvpr17-dvsq.

zhangzeng97 avatar zhangzeng97 commented on June 3, 2024

Hi,

May I ask something about the paper itself here?

I have read through it several times, but there are some points that I cannot understand. Like the word embedding for the labels, may I ask why do we need this? I tried to print the output of validation but it is the 81-dimensional label instead of the 300-dimensional word embeddings.

Thanks a lot:)

Best,
Zhang Zeng

from cvpr17-dvsq.

bl0 avatar bl0 commented on June 3, 2024

Hi Zeng,
You are right, the label itself is 81-dimensional because nuswide is a 81-class dataset, and the word embedding of a single label is 300-dimensional.
Actually, because Nuswide is a multi-label dataset, the label representation of an image is a matrix of 81 * 300 dimensional(not just a vector of 81 or 300 dimension). Specifically, the ith row is the word embedding of label i if the image has label i, otherwise, the ith row will be all zero.(You can prove this by looking at the line 322 of file "net.py").

from cvpr17-dvsq.

zhangzeng97 avatar zhangzeng97 commented on June 3, 2024

Hi Bin,

Thank you so much for your fast reply!

I have gone through it again. May I ask what the codebook C mentioned in the section 3.2 of the paper? My understanding is that for 81 classes, each class contains K centers. And if the C here is the same C in the line 68 of the net_val.py file?
I tried to print out the self.C from the model. It shows that it is a 1024 x 300 tensor. In my opinion, the 300 represents the 300-dimensional vectors while I am not so sure where the 1024 comes from.

Best,
Zeng

from cvpr17-dvsq.

bl0 avatar bl0 commented on June 3, 2024

1024 = n_subcenter(256) * n_subspace(4).
Sorry for my late reply.

from cvpr17-dvsq.

freehome1 avatar freehome1 commented on June 3, 2024

I have got the GoogleNews-vectors-negative300.bin and I wonder how to get the word2vec.txt in cifar10 dataset

from cvpr17-dvsq.

bl0 avatar bl0 commented on June 3, 2024

You can use gensim to load the model and extract wordvector. Here is a tutorial.

import gensim
model = gensim.models.KeyedVectors.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True)
print(model['car'])

from cvpr17-dvsq.

freehome1 avatar freehome1 commented on June 3, 2024

Thanks for your help. However, I just try model['airplane', ...](include the 10 class of cifar10) and get the .txt which is wrong. I hope to know how to get the correct wordvector.

from cvpr17-dvsq.

bl0 avatar bl0 commented on June 3, 2024

I just download the pre-trained word-vector and it works. So maybe you need to check your "GoogleNews-vectors-negative300.bin".
image

For reference, here is the pre-trained word-vector I use:
wget -c "https://s3.amazonaws.com/dl4j-distribution/GoogleNews-vectors-negative300.bin.gz"

from cvpr17-dvsq.

Related Issues (9)

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.