42 using namespace shark;
48 typedef RealVector result_type;
49 RealVector operator () (RealVector x)
const 56 typedef unsigned int result_type;
57 unsigned int operator () (
unsigned int y)
const 64 Add(RealVector offset) : m_offset(offset) {}
66 typedef RealVector result_type;
68 RealVector operator () (RealVector input)
const {
69 return (input + m_offset);
81 std::vector<RealVector> points;
85 std::vector<RealVector> inputs;
86 std::vector<unsigned int> labels;
104 Batches batches = data.
batches();
106 std::cout << batches.size() << std::endl;
107 for (
auto pos = batches.begin(); pos != batches.end(); ++pos) {
108 std::cout << *pos << std::endl;
114 for(
auto const& batch: data.
batches()) {
115 std::cout << batch << std::endl;
118 std::cout << data.
batch(i) << std::endl;
120 for(
auto const& batch: data.
batches()) {
121 for(std::size_t i=0; i !=
batchSize(batch); ++i) {
128 Elements elements = data.
elements();
129 for (
auto pos = elements.begin(); pos != elements.end(); ++pos) {
130 std::cout << *pos << std::endl;
135 for(
auto element: data.
elements()) {
136 std::cout << element << std::endl;
142 std::vector<std::size_t> sizes =
classSizes(data);
150 std::vector<std::size_t> sizes =
classSizes(data);
172 RealVector v(3); v(0) = 1.0; v(1) = 3.0; v(2) = -0.5;
178 for (std::size_t i=0; i != view.
size(); ++i) {
179 std::cout << view[i] << std::endl;
181 std::vector<std::size_t> indices;
188 std::vector<std::size_t> indices;
189 std::size_t maximumBatchSize = 100;