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
23using SampleMapFn = std::function<void(Sample&)>;
24using TensorMapFn = std::function<void(Sample&, simaai::neat::Tensor&)>;
25using SampleMapTransformFn = std::function<Sample(Sample)>;
26
27std::shared_ptr<simaai::neat::graph::Node> Map(SampleMapFn fn, std::string label = {},
28 StageNodeOptions options = {},
29 StageNode::OutputSpecFn out_fn = {});
30
31std::shared_ptr<simaai::neat::graph::Node> TensorMap(TensorMapFn fn, std::string label = {},
32 StageNodeOptions options = {},
33 StageNode::OutputSpecFn out_fn = {});
34
35std::shared_ptr<simaai::neat::graph::Node> Map(SampleMapTransformFn fn, std::string label = {},
36 StageNodeOptions options = {},
37 StageNode::OutputSpecFn out_fn = {});
38
39} // namespace simaai::neat::graph::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.