Giter Club home page Giter Club logo

Comments (3)

glample avatar glample commented on July 20, 2024 1

Oh I did not realize your embeddings file was that small. Are you sure about this? You should have more than 1962 words. Anyway, if that's the case you indeed will want to replace the 10000 in the code by something smaller, like 1500.
Can you try to add --dico_max_rank 1500 in your command?
Check also: https://github.com/facebookresearch/MUSE/search?utf8=%E2%9C%93&q=10000&type=

from muse.

glample avatar glample commented on July 20, 2024

Can you try to add above this line:

scores = emb2.mm(emb1[i:min(n_src, i + bs)].transpose(0, 1)).transpose(0, 1)

This: print(i, n_src, bs), then run it again and copy paste the output?

from muse.

ChangXu-O-O avatar ChangXu-O-O commented on July 20, 2024

(1) I paste the output below. Please have a check. It seems that n_src is fixed to 10000, but my dictionary size is 1962 actually. How can I fix this?
(2) "/MUSE/data/crosslingual/dictionaries/en-fr.5000-6500.txt" is missing during run time, so I downloaded a dictionary and renamed it as "en-fr.5000-6500.txt". But I am not sure whether I am doing the right thing. Where can I get "en-fr.5000-6500.txt" and what is it for?

Thanks!

==========================

INFO - 03/23/18 03:08:02 - 0:07:21 - 1014 source words - csls_knn_10 - Precision at k = 1: 0.098619
INFO - 03/23/18 03:08:02 - 0:07:21 - 1014 source words - csls_knn_10 - Precision at k = 5: 0.295858
INFO - 03/23/18 03:08:02 - 0:07:21 - 1014 source words - csls_knn_10 - Precision at k = 10: 0.690335
(0, 10000, 128)
(128, 10000, 128)
(256, 10000, 128)
(384, 10000, 128)
(512, 10000, 128)
(640, 10000, 128)
(768, 10000, 128)
(896, 10000, 128)
(1024, 10000, 128)
(1152, 10000, 128)
(1280, 10000, 128)
(1408, 10000, 128)
(1536, 10000, 128)
(1664, 10000, 128)
(1792, 10000, 128)
(1920, 10000, 128)
(2048, 10000, 128)
Traceback (most recent call last):
File "unsupervised.py", line 135, in
evaluator.all_eval(to_log)
File "/var/storage/shared/pnrsy/sys/jobs/application_1513627406021_70260/MUSE/src/evaluation/evaluator.py", line 192, in all_eval
self.dist_mean_cosine(to_log)
File "/var/storage/shared/pnrsy/sys/jobs/application_1513627406021_70260/MUSE/src/evaluation/evaluator.py", line 172, in dist_mean_cosine
s2t_candidates = get_candidates(src_emb, tgt_emb, _params)
File "/var/storage/shared/pnrsy/sys/jobs/application_1513627406021_70260/MUSE/src/dico_builder.py", line 39, in get_candidates
scores = emb2.mm(emb1[i:min(n_src, i + bs)].transpose(0, 1)).transpose(0, 1)
ValueError: result of slicing is an empty tensor

from muse.

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.