question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running this tensorflow-1.1.0 version

See original GitHub issue

``$ python -m basic.cli --mode train --noload --debug Traceback (most recent call last): File “anaconda2/envs/tensorflow/lib/python3.5/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “anaconda2/envs/tensorflow/lib/python3.5/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/bi-att-flow/basic/cli.py”, line 5, in <module> from basic.main import main as m File “/bi-att-flow/basic/main.py”, line 14, in <module> from basic.model import get_multi_gpu_models File “/bi-att-flow/basic/model.py”, line 6, in <module> from tensorflow.python.ops.rnn_cell import BasicLSTMCell ImportError: No module named ‘tensorflow.python.ops.rnn_cell’

I have installed the tensorflow-gpu 1.1.0 version and python 3.5.3 and all the required libraries.

It may seem some error with the code version and tensorflow, how can I solve this problem?

Well, it’s hard to find a tensorflow-gpu 0.11 version available now so I have to run the 1.1.0 version.

Thanks a lot!

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:19

github_iconTop GitHub Comments

21reactions
huancommented, Jan 1, 2018

@usakey Your solution not work under tensorflow v1.4

This fix it for me: from tensorflow.contrib.rnn.python.ops.rnn_cell import _Linear

12reactions
usakeycommented, Aug 15, 2017

@x-zho14 @daisyjack As per this commit: https://github.com/allenai/bi-att-flow/commit/3fb0943fefd71eea6886dd247d373f46054e922f , it seems this _linear was changed for tf-1.2 compatibility, but on tf-1.1 it doesn’t work for me either.

So my workaround is to revert back to previous one:

from tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl import _linear
...
flat_out = _linear(flat_args, output_size, bias, bias_start=bias_start)

this works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install tensorflow=1.0.0 - Stack Overflow
1. Tensorflow 1.0.0 is a very old version. · Tensorflow on Windows is somewhat limited and only supports specific Python versions. E.g. ...
Read more >
Some error when running on tensorflow1.1.0 and Keras2.0.5
When I tried the code under Keras2.0.3 and tensorflow1.1.0, some error occurs. Python version is 3.5.2 When I execute the command "python ...
Read more >
What is a TensorFlow Session? - Danijar Hafner
what should i do if i use pretrained model and got error ==> Error running session: Invalid argument: Session was not created with...
Read more >
How to install Tensorflow on the Apple M1 Notebook
and it responded "ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none) ERROR: No matching distribution ...
Read more >
Introduction to graphs and tf.function | TensorFlow Core
Note: For those of you who are only familiar with TensorFlow 1.x, this guide ... You create and run a graph in TensorFlow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found