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

NameError: name 'activations' is not defined #121

Closed
ShivamPanchal opened this issue Mar 13, 2020 · 2 comments
Closed

NameError: name 'activations' is not defined #121

ShivamPanchal opened this issue Mar 13, 2020 · 2 comments

Comments

@ShivamPanchal
Copy link

I am using the latest installation as per this - farizrahman4u/seq2seq#276 (comment)

Now, I am trying to call you Seq2Seq model from recurrentshop, but it gives me an import error.

51 model.add(Embedding(NUM_WORDS, 200, input_length=MAX_LEN)) ---> 52 attn = AttentionSeq2Seq(batch_input_shape=(None, MAX_LEN, 200), hidden_dim=10, output_length=MAX_LEN, output_dim=NUM_WORDS, depth=1)

NameError: name 'activations' is not defined

Its note from keras, I tried installing other versions also.

@ShivamPanchal
Copy link
Author

ShivamPanchal commented Mar 13, 2020

Aye! I used this piece of code and it started working.

'
!pip install keras==2.2.4
!git clone https://www.github.com/farizrahman4u/recurrentshop.git
%cd recurrentshop
!python setup.py install
!sudo pip install git+https://github.com/farizrahman4u/seq2seq.git
'

Thanks, I am closing the issue

@kp-444
Copy link

kp-444 commented Feb 15, 2022

ran this code snippet on my Jupyter notebook(was desperate to solve the issue), got unexpected errors, pd.read_csv could not access the local file uploaded and there were errors with numpy module as well.

Original code :
layers = [[20],[40,20],[45,30,15]]
activation = ['sigmoid','relu']
param_grid = dict(layers = layers,activation=activations,batch_size=[128,256],epochs=[30])
grid = GridSearchCV(estimator=model, param_grid=param_grid,cv=5)

Error :
NameError Traceback (most recent call last)
in
1 layers = [[20],[40,20],[45,30,15]]
2 activation = ['sigmoid','relu']
----> 3 param_grid = dict(layers = layers,activation=activations,batch_size=[128,256],epochs=[30])
4 grid = GridSearchCV(estimator=model, param_grid=param_grid,cv=5)

NameError: name 'activations' is not defined

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