Last active
March 27, 2017 10:41
-
-
Save ivmarkp/86692759637286107d0e5703eb32abf0 to your computer and use it in GitHub Desktop.
Abstract class for Autoencoders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace mlpack { | |
namespace nn { | |
class Autoencoder { | |
public: | |
Autoencoder(const arma::mat& data, | |
const size_t inputSize, | |
const size_t hiddenSize, | |
NoiseLayerType&& noiseLayer = NoisetLayerType()); | |
// Set the size of the input layer. | |
void InputSize(const size_t visible) { this->inputSize = input; } | |
// Get the size of the input layer. | |
size_t InputSize() const { return inputSize; } | |
// Sets size of the hidden layer. | |
void HiddenSize(const size_t hidden) { this->hiddenSize = hidden; } | |
// Gets the size of the hidden layer. | |
size_t HiddenSize() const { return hiddenSize; } | |
// Encode function to learn a representation of data in hidden layer. | |
// similar to GetNewFeatures(...) in sparse_encoder.hpp | |
void EncodeData(const arma::mat& data, | |
cont arma::mat& encodedRepresentation) | |
{ | |
// Do stuff. | |
} | |
// Decode the learned representation. | |
void DecodeData(const arma::mat& data, | |
const arma::mat& decodedRepresentation) | |
{ | |
// Do stuff. | |
} | |
private: | |
const arma::mat& data; | |
size_t visibleSize; | |
size_t hiddenSize; | |
NoiseLayerType = noiseLayer; | |
}; | |
} // nn | |
} // mlpack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment