mlpack
3.1.1
src
mlpack
methods
ann
augmented
tasks
sort.hpp
Go to the documentation of this file.
1
14
#ifndef MLPACK_METHODS_AUGMENTED_TASKS_SORT_HPP
15
#define MLPACK_METHODS_AUGMENTED_TASKS_SORT_HPP
16
17
#include <
mlpack/prereqs.hpp
>
18
19
namespace
mlpack
{
20
namespace
ann
/* Artificial Neural Network */
{
21
namespace
augmented
/* Augmented neural network */
{
22
namespace
tasks
/* Task utilities for augmented */
{
23
41
class
SortTask
42
{
43
public
:
52
SortTask
(
const
size_t
maxLength,
53
const
size_t
bitLen,
54
bool
addSeparator =
false
);
55
65
void
Generate
(arma::field<arma::mat>& input,
66
arma::field<arma::mat>& labels,
67
const
size_t
batchSize,
68
bool
fixedLength =
false
)
const
;
77
void
Generate
(arma::mat& input,
78
arma::mat& labels,
79
const
size_t
batchSize)
const
;
80
81
private
:
82
// Maximum length of the sequence.
83
size_t
maxLength;
84
// Binary length of sorted numbers.
85
size_t
bitLen;
86
// Flag indicating whether generator should produce
87
// separator as part of the sequence
88
bool
addSeparator;
89
};
90
91
}
// namespace tasks
92
}
// namespace augmented
93
}
// namespace ann
94
}
// namespace mlpack
95
96
#include "sort_impl.hpp"
97
#endif
98
99
100
mlpack::ann::augmented::tasks::SortTask
Generator of instances of the sequence sort task.
Definition:
sort.hpp:41
prereqs.hpp
mlpack::ann::augmented::tasks::SortTask::Generate
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.
mlpack::ann::augmented::tasks::SortTask::SortTask
SortTask(const size_t maxLength, const size_t bitLen, bool addSeparator=false)
Creates an instance of the sequence sort task.
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
Generated by
1.8.17