deepy/networks/auto_encoder.py
def encode(self, x):
        """
        Encode given input.
        """
        if not self.encoding_network:
            self.encoding_network = NeuralNetwork(self.input_dim, self.input_tensor)
            self.encoding_network.input_variables = self.input_variables
            for layer in self.encoding_layes:
                self.encoding_network.stack_layer(layer, no_setup=True)
        return self.encoding_network.compute(*x)
def encode(self, x):
        """
        Encode given input.
        """
        if not self.encoding_network:
            self.encoding_network = NeuralNetwork(self.input_dim, self.input_tensor)
            self.encoding_network.input_variables = self.input_variables
            for layer in self.encoding_layes:
                self.encoding_network.stack_layer(layer, no_setup=True)
        return self.encoding_network.compute(*x)
Encode given input.