profile
viewpoint

Ask questionsImportError: cannot import name 'moving_averages'

I have a fresh install on AWS EC2 p2.xlarge.

The TensorFlow install method was pip:

conda list  | grep -E "keras|teano|tensorflow"
tensorflow-gpu            1.0.1                     <pip>

Here is the error:

/home/ubuntu/anaconda3/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py in <module>()
      1 import tensorflow as tf
----> 2 from tensorflow.python.training import moving_averages
      3 from tensorflow.python.ops import tensor_array_ops
      4 from tensorflow.python.ops import control_flow_ops
      5 from tensorflow.python.ops import functional_ops

ImportError: cannot import name 'moving_averages'

Thank you for your support!

tensorflow/tensorflow

Answer questions pGit1

@UkiDLucas THANK YOU!!!

I just installed some trash code from github and it broke my codebase entirely. Using this fixed everything along with sourcing my bashrc file.

useful!

Related questions

Error occurred when finalizing GeneratorDataset iterator hot 4
The flag 'log_dir' is defined twice. hot 3
Using tensorflow gpu 2.1 with Cuda 10.2 hot 2
tf.strings.split bug hot 2
module 'tensorflow_core._api.v2.nn' has no attribute 'rnn_cell' hot 2
Lossy conversion from float32 to uint8. Range [0, 1]. Convert image to uint8 prior to saving to suppress this warning. hot 2
compiling c++ code with TFLite library gives error with cstring hot 2
Tensorflow 2.0 error when used via pyinstaller build - ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow_core.python' hot 2
ModuleNotFoundError: No module named 'tensorflow.contrib' hot 2
TF2.0 AutoGraph issue hot 2
TypeError: Cannot interpret feed_dict key as Tensor: Tensor Tensor("Placeholder:0", shape=(7, 7, 3, 64), dtype=float32) is not an element of this graph. hot 2
Error loading tensorflow hot 2
ModuleNotFoundError: No module named 'tensorflow.contrib' hot 2
AttributeError: module 'tensorflow' has no attribute 'set_random_seed' hot 2
AttributeError: module 'tensorflow._api.v1.lite' has no attribute 'Optimize' version 1.13 hot 2
Github User Rank List