mlpack
3.1.1
src
mlpack
methods
ann
augmented
tasks
add.hpp
Go to the documentation of this file.
1
14
#ifndef MLPACK_METHODS_AUGMENTED_TASKS_ADD_HPP
15
#define MLPACK_METHODS_AUGMENTED_TASKS_ADD_HPP
16
17
#include <
mlpack/prereqs.hpp
>
18
#include <
mlpack/core/dists/discrete_distribution.hpp
>
19
20
namespace
mlpack
{
21
namespace
ann
/* Artificial Neural Network */
{
22
namespace
augmented
/* Augmented neural network */
{
23
namespace
tasks
/* Task utilities for augmented */
{
24
42
class
AddTask
43
{
44
public
:
50
AddTask
(
const
size_t
bitLen);
51
61
void
Generate
(arma::field<arma::mat>& input,
62
arma::field<arma::mat>& labels,
63
const
size_t
batchSize,
64
const
bool
fixedLength =
false
)
const
;
65
74
void
Generate
(arma::mat& input,
75
arma::mat& labels,
76
const
size_t
batchSize)
const
;
77
78
private
:
79
// Maximum binary length of numbers.
80
size_t
bitLen;
81
92
void
Binarize(
const
arma::field<arma::vec>& input,
93
arma::field<arma::mat>& output)
const
;
94
};
95
96
}
// namespace tasks
97
}
// namespace augmented
98
}
// namespace ann
99
}
// namespace mlpack
100
101
#include "add_impl.hpp"
102
#endif
prereqs.hpp
mlpack
@serialization.hpp
Definition:
add_to_po.hpp:21
discrete_distribution.hpp
mlpack::ann::augmented::tasks::AddTask::Generate
void Generate(arma::field< arma::mat > &input, arma::field< arma::mat > &labels, const size_t batchSize, const bool fixedLength=false) const
Generate dataset of a given size.
mlpack::ann::augmented::tasks::AddTask::AddTask
AddTask(const size_t bitLen)
Creates an instance of the binary addition task.
mlpack::ann::augmented::tasks::AddTask
Generator of instances of the binary addition task.
Definition:
add.hpp:42
Generated by
1.8.17