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 'layers' #71

Open
Dongshao-CS opened this issue May 9, 2021 · 1 comment
Open

Comments

@Dongshao-CS
Copy link

When I was running the train.py , this error occurred: self.conv7 = partial(tf.layers.conv2d, kernel_size=7, activation=tf.nn.elu, padding='SAME') AttributeError: module 'tensorflow' has no attribute 'layers'
and I could not find the solution,please help me.

@kopop8
Copy link

kopop8 commented May 12, 2021

You are using Tensorflow v.2. This code is written in Tensorflow v.1. You can upgrade the code to v2 using this https://www.tensorflow.org/guide/upgrade or just install an older Tensorflow version

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

2 participants