ONE - On-device Neural Engine
Loading...
Searching...
No Matches
tfinfo::v2::TensorSignature Class Referencefinal

Class to store input and output tensor information. More...

#include <TensorSignature.h>

Public Types

enum class  Kind { Input , Output }
 

Public Member Functions

 TensorSignature (const Kind kind, const std::string &name)
 
 TensorSignature (const Kind kind, const std::string &name, const ShapeHint &shape_hint)
 
Kind kind () const
 
const TensorNamename ()
 
ShapeHintshapeHint ()
 

Detailed Description

Class to store input and output tensor information.

Definition at line 80 of file TensorSignature.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Input 
Output 

Definition at line 83 of file TensorSignature.h.

Constructor & Destructor Documentation

◆ TensorSignature() [1/2]

tfinfo::v2::TensorSignature::TensorSignature ( const Kind  kind,
const std::string &  name 
)
inline

Definition at line 89 of file TensorSignature.h.

89 : _kind(kind), _tensor_name()
90 {
91 // tensor name can be a form of "placeholder:0" or "placeholder".
92 // If tensor index is omitted, ":0" is appended
93 auto pos = name.find(":");
94 if (pos == std::string::npos)
95 _tensor_name.assign(name + ":0");
96 else
97 _tensor_name.assign(name);
98 }
const TensorName & name()

References name().

◆ TensorSignature() [2/2]

tfinfo::v2::TensorSignature::TensorSignature ( const Kind  kind,
const std::string &  name,
const ShapeHint shape_hint 
)
inline

Definition at line 100 of file TensorSignature.h.

102 {
103 _shape_hint = shape_hint;
104 }
TensorSignature(const Kind kind, const std::string &name)

Member Function Documentation

◆ kind()

Kind tfinfo::v2::TensorSignature::kind ( ) const
inline

Definition at line 107 of file TensorSignature.h.

107{ return _kind; }

◆ name()

const TensorName & tfinfo::v2::TensorSignature::name ( )
inline

Definition at line 109 of file TensorSignature.h.

109{ return _tensor_name; }

Referenced by TensorSignature().

◆ shapeHint()

ShapeHint & tfinfo::v2::TensorSignature::shapeHint ( )
inline

Definition at line 111 of file TensorSignature.h.

111{ return _shape_hint; }

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