Giter VIP home page Giter VIP logo

Comments (14)

bshall avatar bshall commented on June 13, 2024

Hi @liu-x-p,

Are you running the evaluation on the pretrained model? I've just re-run the encode and evaluate scripts on my side and they seem to work fine. Could you send the exact commands you used with encode.py and zerospeech2020-evaluate?

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

@bshall Thank you for your reply.
The commands I used are
python encode.py checkpoint=checkpoints/2019english/model.ckpt-200000.pt out_dir=test dataset=2019/english
zerospeech2020-evaluate 2019 -j 2 -d cosine --dataset ./data ./submissionzsmyuando200k -o submissionzsmyuando200k/2019.json
The model is trained following your instruction. The model.ckpt-200000.pt was trained with resuming from early ckpt, but I also tried the model without resume, it also have tis problem.

from zerospeech.

bshall avatar bshall commented on June 13, 2024

No problem @liu-x-p,

The zerospeech2020-evaluate script expects the directory structure to look like submission/2019/english/test so could you try:

python encode.py checkpoint=checkpoints/2019english/model.ckpt-200000.pt out_dir=submission/2019/english/test dataset=2019/english

and then run:

zerospeech2020-evaluate 2019 -j 2 -d cosine --dataset ./data submission/

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

@bshall But I moved the test files to the correct directory before evaluate. And I can really run the evaluate script if I only evaluate,the test files in submission/2019/english/ , but once I move the auxiliary_embedding1 directory into it and run evaluate, it will go wrong.

from zerospeech.

bshall avatar bshall commented on June 13, 2024

If you run:

python encode.py checkpoint=checkpoints/2019english/model.ckpt-200000.pt out_dir=submission/2019/english/test dataset=2019/english save_auxiliary=true

It will put everything in the correct directory structure (including the auxiliary embeddings). Then you can just run:

zerospeech2020-evaluate 2019 -j 2 -d cosine --dataset ./data submission/

and it'll evaluate everything (no need to copy any of the folders). Hopefully that works for you?

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

@bshall It still report that error. :(
Maybe I should just not use the Auxiliary embedding

from zerospeech.

bshall avatar bshall commented on June 13, 2024

That's strange. Could you attach the S011_2504494747.txt file and the S011_2504494747.mel.npy file so I can try to figure out what's going wrong?

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

Thank you for your help. I uploaded the S011_2504494747.txt files for both test and auxiliary_embedding1
S011_2504494747_auxiliary.txt
S011_2504494747_test.txt

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

S011_2504494747.mel.zip

from zerospeech.

bshall avatar bshall commented on June 13, 2024

Thanks @liu-x-p, I think you might be using an altered version of encode.py. Can you compare your's against lines 39-45 here? It seems like your auxiliary embeddings are hooking on to a different layer in the encoder (and don't use transpose to get the correct ordering of dimensions).

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

@bshall They're the same.
But I changed some layers in the model, could that be the reason? I didn't change the parameters in the code.

from zerospeech.

bshall avatar bshall commented on June 13, 2024

Yip, that's the problem. If you want to change layers you'll also have to change where the forward hook is registered. You need to register it on the layer where you want to extract the auxiliary embeddings and you need to make sure the dimensions are ordered correctly i.e. whether to transpose or not.

from zerospeech.

liu-x-p avatar liu-x-p commented on June 13, 2024

Thank you! @bshall
I haven't use hook, and I searched for it and checked the encode.py . It did point to a different layer's output, and I changed it then it works.

from zerospeech.

bshall avatar bshall commented on June 13, 2024

No problem @liu-x-p.

from zerospeech.

Related Issues (17)

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.