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' has no attribute 'space_to_depth" #184

Open
nonlin opened this issue May 4, 2020 · 4 comments
Open

Comments

@nonlin
Copy link

nonlin commented May 4, 2020

for keras_yolo.py line 32 ini space_to_depth_x2

After running python yad2k.py yolo.cfg yolo.weights model_data/yolo.h5

What is the solution to this?

@hcpv
Copy link

hcpv commented May 27, 2020

It is due to TensorFlow version. You are probably using TensorFlow 2.
Solution: remove TensorFlow 2 and install TensorFlow 1 or create a new virtual environment and install TensorFlow 1 and other packages

@Mr-Zhu-pg
Copy link

hello, we can't remove it because keras'version we must use Tensorflow>2.2

@HugoAhoy
Copy link

HugoAhoy commented Mar 6, 2021

use tf.compat.v1.space_to_depth() instead.

@luiyiko
Copy link

luiyiko commented May 26, 2021

@HugoAhoy thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants