-
Notifications
You must be signed in to change notification settings - Fork 265
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
Cannot execute your code due to missing attribute '_linear' #10
Comments
So I was able to fix it now by deleting the entire 'linear =...' line. Now, another problem appears: ImportError: cannot import name 'TextCorrectorModel', when I execute the main file. I load the file 'text_corrector_models.py', and then run that file alone. I got the error message: ArgumentError: argument --config: conflicting option string: --config. These errors, surprisingly, stem from seq2seq.py. But the thing is: I already successful ran the seq2seq.py file. When I got rid of the line import seq2seq in the 'text_corrector_models.py' and ran this Python script, no error was announced! Cannot believe running your execution file takes that much effort, but I still cannot give up;( |
go to seq2seq.py add in to seq2seq: you will need seq2seq for text_corrector_models.py |
Hi, I'm getting the same error as in the title. I did as you suggest @largevaluesoftwo but I still get this: |
This stems from the fact that newer versions of TF don't have the _linear op implemented in rnn_cell_impl anymore. If you downgrade your TF to 1.2 it should definitely work. Alternatively, i assume you can substitute _linear with a standard TF layer such as tf.contrib.layers.fully_connected. I am working on that currently for my own model |
@anthnyprschka i am newer , could you tell me more details of the substitude _linear with tf.xxxxx.fully_connected . thanks very much! |
Hi, I use tf 1.8 and solve this by changing from tensorflow.contrib.rnn.python.ops import core_rnn_cell
linear = core_rnn_cell._Linear This works for me. |
@lutein many thanks. This works for me, too. |
@lutein any alternative in tensorflow 2?? I was unable to find the _linear function in tensorflow add on. |
Yes, Any alternative in tensorflow 2 for |
How about TensorFlow 2 ? I can't find _Linear in TF2 too. |
Hi Alex, thanks for your great work!! I tried executing your main execution file ("textcorrector.ipnyb"), but I keep getting this error message: AttributeError: module 'tensorflow.python.ops.rnn_cell' has no attribute '_linear'. I ran your code using Jupyter Notebook, with Python's 3.5 version (latest), and tensorflow's 1.2.1 version (latest too). I don't understand why it keeps saying certain module lacks of the essential attribute to run your code. Could you please help explain why this happens, Alex?
The text was updated successfully, but these errors were encountered: