Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find %s Set GloVe Directory in Global.py #27

Open
SAIVENKATARAJU opened this issue May 15, 2020 · 1 comment
Open

Could not find %s Set GloVe Directory in Global.py #27

SAIVENKATARAJU opened this issue May 15, 2020 · 1 comment

Comments

@SAIVENKATARAJU
Copy link

I am getting the following error while executing the following code.

from RMDL import RMDL_Text

text_classification=RMDL_Text.Text_Classification(Xtrain,Ytrain,Xtest,Ytest)
Could not find %s Set GloVe Directory in Global.py  <module 'RMDL.Download.Download_Glove' from 'C:\\Users\\Veni\\Anaconda3\\lib\\site-packages\\RMDL\\Download\\Download_Glove.py'>
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-22-a2b7412e3f8f> in <module>()
      1 from RMDL import RMDL_Text
      2 
----> 3 text_classification=RMDL_Text.Text_Classification(Xtrain,Ytrain,Xtest,Ytest)

~\Anaconda3\lib\site-packages\RMDL\RMDL_Text.py in Text_Classification(x_train, y_train, x_test, y_test, batch_size, EMBEDDING_DIM, MAX_SEQUENCE_LENGTH, MAX_NB_WORDS, GloVe_dir, GloVe_file, sparse_categorical, random_deep, epochs, plot, min_hidden_layer_dnn, max_hidden_layer_dnn, min_nodes_dnn, max_nodes_dnn, min_hidden_layer_rnn, max_hidden_layer_rnn, min_nodes_rnn, max_nodes_rnn, min_hidden_layer_cnn, max_hidden_layer_cnn, min_nodes_cnn, max_nodes_cnn, random_state, random_optimizor, dropout)
     56         if not os.path.isfile(GloVe_DIR):
     57             print("Could not find %s Set GloVe Directory in Global.py ", GloVe)
---> 58             exit()
     59 
     60     G.setup()

NameError: name 'exit' is not defined
@Lxixnxuxs
Copy link

I experienced the same issue, but this solution worked for me:

  • Downlad the glove.6B.zip(http://nlp.stanford.edu/data/glove.6B.zip) by yourself and unzip it

  • Pass the Path to your unzipped Directory to the Text_Classification Constructor

  • In your case, it would look something like text_classification=RMDL_Text.Text_Classification(Xtrain,Ytrain,Xtest,Ytest, GloVe_dir="path/to/unzipped/directory")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants