tensorflow: Couldn't find and import the 'graph_transforms' module in tensorflow1.14
Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Centos7.6
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
- TensorFlow installed from (source or binary): source
- TensorFlow version (use command below): 1.14
- Python version: 2.7
- Bazel version (if compiling from source): 24.1
- GCC/Compiler version (if compiling from source):
- CUDA/cuDNN version:
- GPU model and memory:
You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
import tensorflow.tools.graph_transforms as graph_transforms
Error message:
AttributeError: 'module' object has no attribute 'graph_transforms'
Describe the expected behavior Successfully import the graph_transforms module. This code succesfully run with tf 1.13 but failed on tf 1.14.
Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.
import tensorflow.tools.graph_transforms as graph_transforms
Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. The installed ‘graph_transforms’ module seems has been moved to tensorflow_core folder in site-packages. Is this as expected?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (10 by maintainers)
For 2.0 it seems the issue has cropped up again:
The issue is reproducible both with TF2.0 release version and TF nightly.
Is there any solution for TF 2.2?