ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::CircleTopKV2GraphBuilder Class Reference

#include <CircleTopKV2.h>

Collaboration diagram for luci::CircleTopKV2GraphBuilder:

Public Member Functions

bool validate (const ValidateArgs &args) const final
 
- Public Member Functions inherited from luci::GraphBuilderMultiOutput
virtual ~GraphBuilderMultiOutput ()=default
 
CircleNodebuild (const circle::OperatorT &op, GraphBuilderContext *context) const final
 
- Public Member Functions inherited from luci::GraphBuilderBase
virtual ~GraphBuilderBase ()=default
 

Detailed Description

Definition at line 25 of file CircleTopKV2.h.

Member Function Documentation

◆ validate()

bool luci::CircleTopKV2GraphBuilder::validate ( const ValidateArgs args) const
finalvirtual

Implements luci::GraphBuilderBase.

Definition at line 28 of file CircleTopKV2.cpp.

29{
30 const auto &inputs = args.op.inputs;
31 const auto &outputs = args.op.outputs;
32
33 if (inputs.size() != 2)
34 return false;
35 if (outputs.size() != 2)
36 return false;
37
38 const auto tensors = args.reader.tensors();
39 const auto tensor = tensors.at(inputs.at(1));
40 assert(tensor != nullptr);
41 if (tensor->type() != circle::TensorType_INT32)
42 return false;
43
44 return true;
45}
args
Definition infer.py:21

The documentation for this class was generated from the following files: