Ask Your Question
0

How to debug this Error? I am using tensorflow version 1.5.0 [closed]

asked 2020-02-25 07:30:35 -0600

tf.compact.v1.run() AttributeError: module 'tensorflow' has no attribute 'compact'

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2020-02-25 08:09:50.267332

Comments

sorry, this is the opencv site, we can't help you with tf problems

berak gravatar imageberak ( 2020-02-25 08:10:41 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2020-02-25 08:16:14 -0600

updated 2020-02-25 08:17:18 -0600

First of, this question has nothing to do with OpenCV and is a Tensorflow one. This would be a good candidate for Stack Overflow instead.

Two issues:

  1. The error itself is descriptive. Their is no API called compact, it is compat.
  2. The compat API was added for backward compatibility. Even if you fix the spelling mistake, your code will not work with your current version of TF. If you look at the supported APIs of TF 1.5, you will see that its compat API only supports tf.compat.as_bytes, tf.compat.as_str_any and tf.compat.as_text. Support for v1 and v2 compatibility was first added in TF 1.14. Either upgrade your TF to that version specific version; pip install --upgrade tensorflow==1.14, or just update it to the newest version; pip install tensorflow
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-25 07:30:35 -0600

Seen: 360 times

Last updated: Feb 25 '20