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_core.python.keras.api._v2.keras.activations' has no attribute 'swish' #50

Open
cyysky opened this issue Oct 30, 2020 · 1 comment

Comments

@cyysky
Copy link

cyysky commented Oct 30, 2020

Just installed follow instruction and run example. Hit error.

(kt) D:\Sample\MVTec-Anomaly-Detection>python train.py -d mvtec/capsule -a mvtecCAE -b 8 -l ssim -c grayscale
2020-10-30 17:31:52.414545: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
Traceback (most recent call last):
  File "train.py", line 11, in <module>
    from autoencoder.autoencoder import AutoEncoder
  File "D:\Sample\MVTec-Anomaly-Detection\autoencoder\autoencoder.py", line 14, in <module>
    import ktrain
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\ktrain\__init__.py", line 2, in <module>
    from . import imports as I
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\ktrain\imports.py", line 219, in <module>
    import transformers
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\transformers\__init__.py", line 135, in <module>
    from .pipelines import (
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\transformers\pipelines.py", line 47, in <module>
    from .modeling_tf_auto import (
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\transformers\modeling_tf_auto.py", line 45, in <module>
    from .modeling_tf_albert import (
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\transformers\modeling_tf_albert.py", line 24, in <module>
    from .activations_tf import get_tf_activation
  File "D:\bin\miniconda3\envs\kt\lib\site-packages\transformers\activations_tf.py", line 53, in <module>
    "swish": tf.keras.activations.swish,
AttributeError: module 'tensorflow_core.python.keras.api._v2.keras.activations' has no attribute 'swish'

(kt) D:\Sample\MVTec-Anomaly-Detection>
@simplew2011
Copy link

update tensorflow to 2.3 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