You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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