mlpack
|
Generator of instances of the sequence sort task. More...
#include <sort.hpp>
Public Member Functions | |
SortTask (const size_t maxLength, const size_t bitLen, bool addSeparator=false) | |
Creates an instance of the sequence sort task. More... | |
void | Generate (arma::field< arma::mat > &input, arma::field< arma::mat > &labels, const size_t batchSize, bool fixedLength=false) const |
Generate dataset of a given size. More... | |
void | Generate (arma::mat &input, arma::mat &labels, const size_t batchSize) const |
Generate dataset of a given size and store it in arma::mat object. More... | |
Generator of instances of the sequence sort task.
The parameters are:
Generated datasets are compliant with mlpack format - every dataset element is shaped as a vector of length (binary length) * (sequence length).
Example of generated dataset (sequence length = 3, binary length = 2):
mlpack::ann::augmented::tasks::SortTask::SortTask | ( | const size_t | maxLength, |
const size_t | bitLen, | ||
bool | addSeparator = false |
||
) |
Creates an instance of the sequence sort task.
maxLength | Maximum length of the number sequence. |
bitLen | Binary length of sorted numbers. |
addSeparator | Flag indicating whether generator should emit separating symbol after input sequence. |
void mlpack::ann::augmented::tasks::SortTask::Generate | ( | arma::field< arma::mat > & | input, |
arma::field< arma::mat > & | labels, | ||
const size_t | batchSize, | ||
bool | fixedLength = false |
||
) | const |
Generate dataset of a given size.
input | The variable to store input sequences. |
labels | The variable to store output sequences. |
batchSize | The dataset size. |
fixedLength | Flag indicating whether generator should emit sequences of pairwise equal length. |
void mlpack::ann::augmented::tasks::SortTask::Generate | ( | arma::mat & | input, |
arma::mat & | labels, | ||
const size_t | batchSize | ||
) | const |
Generate dataset of a given size and store it in arma::mat object.
input | The variable to store input sequences. |
labels | The variable to store output sequences. |
batchSize | The dataset size. |