ONE - On-device Neural Engine
Loading...
Searching...
No Matches
ReLULayer Struct Referencefinal

#include <GraphBuilder.h>

Data Structures

class  Return
 

Public Member Functions

std::unique_ptr< Returnoperator() (GraphBuilder::Context *ctx)
 

Detailed Description

Definition at line 210 of file GraphBuilder.h.

Member Function Documentation

◆ operator()()

std::unique_ptr< Return > ReLULayer::operator() ( GraphBuilder::Context ctx)
inline

Definition at line 229 of file GraphBuilder.h.

230 {
231 auto relu_node = ctx->graph()->nodes()->create<loco::ReLU>();
232
233 relu_node->input(ctx->stack()->pop());
234
235 ctx->stack()->push(relu_node);
236
237 return std::make_unique<Return>(relu_node);
238 }
loco::Graph * graph(void)
Stack * stack(void)
void push(loco::Node *node)
loco::Node * pop(void)
NodeContext * nodes(void)
Definition Graph.h:218
Derived * create(Args &&...args)
Definition NodePool.h:37
Create a new value that rectifies its input.
Definition Nodes.h:159
Node * input(void) const
Definition Nodes.h:164

References loco::NodePool::create(), GraphBuilder::Context::graph(), loco::ReLU::input(), loco::Graph::nodes(), GraphBuilder::Stack::pop(), GraphBuilder::Stack::push(), and GraphBuilder::Context::stack().


The documentation for this struct was generated from the following file: