Skip to main content

Map.h File

Simple map-style stage helpers (Sample/Tensor). More...

Included Headers

#include "graph/StageExecutor.h" #include "graph/nodes/StageNode.h" #include <functional> #include <memory> #include <string> #include <utility> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegraph
namespacenodes

Description

Simple map-style stage helpers (Sample/Tensor).

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
10
11#include <functional>
12#include <memory>
13#include <string>
14#include <utility>
15#include <vector>
16
17namespace simaai::neat {
18struct Tensor;
19} // namespace simaai::neat
20
22
24using SampleMapFn = std::function<void(Sample&)>;
26using TensorMapFn = std::function<void(Sample&, simaai::neat::Tensor&)>;
28using SampleMapTransformFn = std::function<Sample(Sample)>;
29
39std::shared_ptr<simaai::neat::graph::Node> Map(SampleMapFn fn, std::string label = {},
40 StageNodeOptions options = {},
41 StageNode::OutputSpecFn out_fn = {});
42
52std::shared_ptr<simaai::neat::graph::Node> TensorMap(TensorMapFn fn, std::string label = {},
53 StageNodeOptions options = {},
54 StageNode::OutputSpecFn out_fn = {});
55
65std::shared_ptr<simaai::neat::graph::Node> Map(SampleMapTransformFn fn, std::string label = {},
66 StageNodeOptions options = {},
67 StageNode::OutputSpecFn out_fn = {});
68
69} // namespace simaai::neat::graph::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.