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.keras.api._v1.keras.layers' has no attribute 'Conv1DTranspose' #236

Open
kz258852 opened this issue Oct 25, 2022 · 3 comments

Comments

@kz258852
Copy link

Traceback (most recent call last):
File "train.py", line 11, in
from tensorflow_model_optimization.sparsity import keras as sparsity
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/init.py", line 86, in
from tensorflow_model_optimization.python.core.api import clustering
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/api/init.py", line 16, in
from tensorflow_model_optimization.python.core.api import clustering
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/api/clustering/init.py", line 16, in
from tensorflow_model_optimization.python.core.api.clustering import keras
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/api/clustering/keras/init.py", line 19, in
from tensorflow_model_optimization.python.core.clustering.keras.cluster import cluster_scope
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/clustering/keras/cluster.py", line 22, in
from tensorflow_model_optimization.python.core.clustering.keras import cluster_wrapper
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper.py", line 24, in
from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py", line 57, in
class ClusteringRegistry(object):
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_model_optimization/python/core/clustering/keras/clustering_registry.py", line 65, in ClusteringRegistry
layers.Conv1DTranspose: ['kernel'],
File "/home/kz/anaconda3/envs/tf115/lib/python3.6/site-packages/tensorflow_core/python/util/module_wrapper.py", line 193, in getattr
attr = getattr(self._tfmw_wrapped_module, name)
AttributeError: module 'tensorflow.python.keras.api._v1.keras.layers' has no attribute 'Conv1DTranspose'

@kz258852
Copy link
Author

Bro, the tensorflow-gpu versions I used are 1.15.0 and 2.0.0. This problem occurred when I was running the train.py. Is this caused by the tensorflow-gpu version? Which version of tensorflow-gpu is more appropriate? Thank u

@david8862
Copy link
Owner

@kz258852 what is your training cmd?

@Alioth-1701
Copy link

Alioth-1701 commented Nov 9, 2022

I also got into the same problem, my tensorflow-gpu versions is 2.2.0 and I wanted to train on yolo3_mobilenet; input shape as 736x1280; batch size of 2. I am not sure what has been going on since the project worked weeks ago
image

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

3 participants