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

AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn' #40053

Closed
ollieyeahlong opened this issue Jun 1, 2020 · 5 comments
Assignees
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues TF 1.14 for issues seen with TF 1.14 type:build/install Build and install issues

Comments

@ollieyeahlong
Copy link

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary): Installed using anaconda and though conda install -c anaconda keras
  • TensorFlow version: 1.14.0
  • Python version:
  • Installed using virtualenv? pip? conda?: condo AND tried using pip with a fresh install
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source): Not sure
  • CUDA/cuDNN version: Not using gpu
  • GPU model and memory:

Describe the problem
I am trying to run a .py program from the anaconda prompt. The program is using tensorflow and keras. I have set up a new condo environment and tried to install tensorflow and keras using both pip and conda. Once in this environment I try to run the code and it produces the error message:
AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn'

Provide the exact sequence of commands / steps that you executed before running into the problem
I activate my new environment, change to the directory of my code, the call python vad.py.

Any 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.
(PythonCPU) C:\Users\User\Documents\SpeechRecognition\task4>python vad.py
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Using TensorFlow backend.
Traceback (most recent call last):
File "vad.py", line 3, in
import tensorflow as tf
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow_init
.py", line 28, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python_init
.py", line 63, in
from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\framework_lib.py", line 25, in
from tensorflow.python.framework.ops import Graph
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\ops.py", line 54, in
from tensorflow.python.platform import app
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\platform\app.py", line 23, in
from absl.app import run as run
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\absl\app.py", line 35, in
import pdb
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\pdb.py", line 76, in
import code
File "C:\Users\User\Documents\SpeechRecognition\task4\code.py", line 4, in
import keras
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras_init
.py", line 3, in
from . import utils
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\utils_init.py", line 6, in
from . import conv_utils
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\utils\conv_utils.py", line 9, in
from .. import backend as K
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend_init.py", line 1, in
from .load_backend import epsilon
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend\load_backend.py", line 90, in
from .tensorflow_backend import *
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\keras\backend\tensorflow_backend.py", line 9, in
from tensorflow.python.ops import image_ops as tf_image_ops
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\ops\image_ops.py", line 28, in
from tensorflow.python.ops.gen_image_ops import *
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\ops\gen_image_ops.py", line 19, in
from tensorflow.python.framework import common_shapes as _common_shapes
File "C:\Users\User\anaconda3\envs\PythonCPU\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 729, in
ops._set_call_cpp_shape_fn(call_cpp_shape_fn)
AttributeError: module 'tensorflow.python.framework.ops' has no attribute '_set_call_cpp_shape_fn'

@ollieyeahlong ollieyeahlong added the type:build/install Build and install issues label Jun 1, 2020
@ollieyeahlong
Copy link
Author

python version is 3.6 sorry forgot to add

@Saduf2019 Saduf2019 added subtype:windows Windows Build/Installation Issues TF 1.14 for issues seen with TF 1.14 labels Jun 5, 2020
@Saduf2019
Copy link
Contributor

@ollieyeahlong
Please refer to these links , link1 let us know if it helps.
Also is there any particular reason for using an old version of tensorflow, would you like to upgrade to later versions and let us know if the issue exist.

@Saduf2019 Saduf2019 added the stat:awaiting response Status - Awaiting response from author label Jun 5, 2020
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@google-ml-butler google-ml-butler bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Jun 12, 2020
@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author subtype:windows Windows Build/Installation Issues TF 1.14 for issues seen with TF 1.14 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

2 participants