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

#include <CircleDepthToSpace.h>

Collaboration diagram for luci::CircleDepthToSpaceGraphBuilder:

Public Member Functions

bool validate (const ValidateArgs &args) const final
 
- Public Member Functions inherited from luci::GraphBuilder
virtual ~GraphBuilder ()=default
 
bool validate (const ValidateArgs &args, size_t input_cnt) const
 
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 CircleDepthToSpace.h.

Member Function Documentation

◆ validate()

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

Implements luci::GraphBuilderBase.

Definition at line 28 of file CircleDepthToSpace.cpp.

29{
30 if (!GraphBuilder::validate(args, 1))
31 return false;
32
33 const auto &inputs = args.op.inputs;
34 const auto &outputs = args.op.outputs;
35
36 const auto *options = args.op.builtin_options.AsDepthToSpaceOptions();
37 const auto tensors = args.reader.tensors();
38 assert(tensors[outputs[0]] != nullptr && tensors[inputs.at(0)] != nullptr);
39
40 if (tensors[outputs[0]]->type() != tensors[inputs.at(0)]->type())
41 {
42 return false;
43 }
44
45 if (options->block_size < 2)
46 return false;
47
48 return true;
49}
bool validate(const ValidateArgs &args, size_t input_cnt) const
args
Definition infer.py:21
type
Definition infer.py:18

References luci::GraphBuilder::validate().


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