materialsintelligence/mat2vec

Question about the outputs

Wushengyao opened this issue · 5 comments

I have successfully installed the mat2vec in the conda environment (python=3.6) and tried to reproduce your work. However, when I followed the directions under Processing and Pretrained Embeddings, no output appeared (and no error message).

For example, I run test.txt in the root folder of this repository, after serveral seconds running, no outputs (like pic1.jpg).

test.txt
pic1

I am an freshman in machine learning, hoping to get your guidance. Thank you!

Hi! Could you please include what is in test.txt? Without knowing what is in there we cannot offer guidance. Also, as a side note, you might want to change the file's extension to ".py" (e.g. "test.py") to be consistent with the naming conventions for python files.

In test.txt:

from gensim.models import Word2Vec
w2v_model = Word2Vec.load("mat2vec/training/models/pretrained_embeddings")
w2v_model.wv.most_similar("thermoelectric")

And I have tried the .py extension, the result was the same.

Try adding a print statement around the last line or running those lines in an interactive python shell. Although it will print the result in interactive mode, python won't write anything to the terminal when it evaluates a statement like w2v_model.wv.most_similar("thermoelectric") in a script.

I get it. Thank you very much!

You're welcome. :)