from keras.layers import containers

475 views
Skip to first unread message

huseyin...@gmail.com

unread,
Feb 18, 2019, 6:44:55 PM2/18/19
to Keras-users
Hello,

I got error when I attemp to import these below. 

from keras.layers.core import AutoEncoder,Merge

ImportError: cannot import name 'AutoEncoder'
ImportError: cannot import name 'Merge'


from keras.layers import containers
ImportError: cannot import name 'containers'


from keras.optimizers import kl_divergence
ImportError: cannot import name 'kl_divergence'

The versions that I use is below
Python version 
Python 3.5.2 :: Anaconda 4.1.1 (64-bit)

Keras version
Using TensorFlow backend.
2.1.6

Tensorflow version 
1.5.1

Sergey O.

unread,
Feb 18, 2019, 6:52:06 PM2/18/19
to huseyin...@gmail.com, Keras-users
You'll have to go back to version 0.3.3 of keras, Starting with version 1.0.0, the AutoEncoder layer was removed:
https://faroit.github.io/keras-docs/0.3.3/layers/core/#autoencoder

If you are trying to implement an autoencoder using the latest version of keras, see the following link:

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/9250b96a-390f-4827-9d45-1ece1df35bf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

huseyin...@gmail.com

unread,
Feb 18, 2019, 7:37:50 PM2/18/19
to Keras-users
I hava installed keras 0.3.3 version bu then I got the error below


  File "C:\Users\usernm\Anaconda3\lib\site-packages\keras\layers\containers.py", line 7, in <module>
    from ..layers.core import Layer, Merge, Siamese, SiameseHead

ImportError: cannot import name 'Merge'


19 Şubat 2019 Salı 02:52:06 UTC+3 tarihinde sokrypton yazdı:

Lance Norskog

unread,
Feb 19, 2019, 4:35:26 PM2/19/19
to huseyin...@gmail.com, Keras-users
What are you trying to do?
If you are doing self-teaching, you should start with the latest Keras and autoencoder tutorial.
If you are resurrecting old code, maybe share the code here.

Lance



For more options, visit https://groups.google.com/d/optout.


--
Lance Norskog
lance....@gmail.com
Redwood City, CA
Reply all
Reply to author
Forward
0 new messages