I'm looking for implementations of convolutional autoencoder using MxNet. But there is only one example of autoencoder based on Fully Connected Networks, which is here. There is also an issue asking similar questions in github, but receives very few responses. Is there any toy example of convolutional autoencoders implemented using MxNet?
Asked
Active
Viewed 643 times
0

Srikar Appalaraju
- 71,928
- 54
- 216
- 264

pfc
- 1,831
- 4
- 27
- 50
-
Did you see any good toy example for it in other libs? It is usually not recommended to use auto-encoders with CNN, as far as I could see. – Guy Apr 23 '17 at 16:58
-
@Guy Why not recommend CNN in auto-encoders? – pfc Apr 25 '17 at 04:39
-
Most the people I talked with were saying that on CNN for 2-dim input (mainly images), it is relatively easy to get labels or other tags for supervised learning. What is your input and what do you want to get from the auto encoders? – Guy Apr 25 '17 at 20:35
-
@Guy I want to do clustering on some spatial data. I want to use autoencoders to find a projection in a low-dimensional space. – pfc Apr 25 '17 at 22:48
2 Answers
0
There is still no convolutional autoencoder example in mxnet, though there is some progress in research in that area. Anyway, there is a ticket for that in MxNet github, but it is still open. You are more than welcome to contribute, by, for example, migrating the code from Keras.

Sergei
- 1,617
- 15
- 31
0
Please find an example of Conv Autoencoder model in Mxnet Gluon. Code quoted from here. Training this model in a standard way in Gluon.
from mxnet import gluon as g
class CNNAutoencoder(g.nn.HybridBlock):
def __init__(self):
super(CNNAutoencoder, self).__init__()
with self.name_scope():
self.encoder = g.nn.HybridSequential('encoder_')
with self.encoder.name_scope():
self.encoder.add(g.nn.Conv2D(16, 3, strides=3, padding=1, activation='relu'))
self.encoder.add(g.nn.MaxPool2D(2, 2))
self.encoder.add(g.nn.Conv2D(8, 3, strides=2, padding=1, activation='relu'))
self.encoder.add(g.nn.MaxPool2D(2, 1))
self.decoder = g.nn.HybridSequential('decoder_')
with self.decoder.name_scope():
self.decoder.add(g.nn.Conv2DTranspose(16, 3, strides=2, activation='relu'))
self.decoder.add(g.nn.Conv2DTranspose(8, 5, strides=3, padding=1, activation='relu'))
self.decoder.add(g.nn.Conv2DTranspose(1, 2, strides=2, padding=1, activation='tanh'))
def forward(self, x):
x = self.encoder(x)
x = self.decoder(x)
return x
model = CNNAutoencoder()
model.hybridize()

Srikar Appalaraju
- 71,928
- 54
- 216
- 264