Help loading a WordEmbedding #3161
Unanswered
matthewchen67
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have downloaded the GloVe word embeddings and I am trying to load it into my program which is using the PyTorch engine but it is giving the exception FileNotFoundException: glove_6B_50d.pt file not found in: /home/user01.
I have it pointing to a file located locally as a glove_6B_50d.zip file that only contains the file glove_6B_50d.txt
Here is my code to load the TextEmbedding:
Criteria<String, float[]> criteria = Criteria.builder().setTypes(String.class, float[].class)
.optEngine("PyTorch")
.optTranslatorFactory(new TextEmbeddingtranslatorFactory())
.optModelPath("/home/user01")
.optModelName("glove_6B_50d")
.build()
ZooModel<String, float[]> embedding = criteria.loadModel();
ModelZooTextEmbedding modelZooTextEmbedding = new ModelZooTextEmbedding(embedding);
I apologize if this is a trivial issue but I have been trying to look around to see how to do this to no avail. I am aware that MxNet has the GloVe word embedding available in the model zoo but I want to use the PyTorch engine because I only have a GPU that can utilize CUDA 12 and I want to see the performance difference between the CPU and GPU.
Beta Was this translation helpful? Give feedback.
All reactions