Skip to content

AutoEncoders

Shraddha Kulkarni edited this page Jun 14, 2017 · 1 revision

ae

An autoencoder, autoassociator or Diabolo network is an artificial neural network used for unsupervised learning of efficient coding. The aim of an autoencoder is to learn a representation (encoding) for a set of data, typically for the purpose of dimensionality reduction. Recently, the autoencoder concept has become more widely used for learning generative models of data.

Steps for AutoEncoders :

steps

Code

Architecture of Neural Network
class SAE(nn.Module): def __init__(self, ): super(SAE, self).__init__() self.fc1 = nn.Linear(nb_movies, 20) self.fc2 = nn.Linear(20,10) self.fc3 = nn.Linear(10,20) self.fc4 = nn.Linear(20, nb_movies) self.activation = nn.Sigmoid()

def forward(self, x): x = self.activation(self.fc1(x)) x = self.activation(self.fc2(x)) x = self.activation(self.fc3(x)) x = self.fc4(x) return x

sae = SAE() criterion = nn.MSELoss() optimizer = optim.RMSprop(sae.parameters, lr = 0.01, weight_decay = 0.5)

Output

Train Loss = 0.9158
Test Loss = 0.9524

Clone this wiki locally