ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnkit::support::tflite Namespace Reference

Data Structures

class  AbstractBackend
 
class  InputTensorSet
 
class  OutputTensorSet
 
class  TensorContext
 
struct  TensorSet
 

Functions

nncc::core::ADT::tensor::Shape tensor_shape (const TfLiteTensor *t)
 

Function Documentation

◆ tensor_shape()

nncc::core::ADT::tensor::Shape nnkit::support::tflite::tensor_shape ( const TfLiteTensor *  t)

Definition at line 26 of file TensorUtils.cpp.

27{
29
30 const int rank = t->dims->size;
31
32 shape.resize(rank);
33 for (int axis = 0; axis < rank; ++axis)
34 {
35 shape.dim(axis) = t->dims->data[axis];
36 }
37
38 return shape;
39}
uint32_t & dim(uint32_t axis)
Definition Shape.cpp:42
Shape & resize(uint32_t size)
Definition Shape.cpp:36

References nncc::core::ADT::tensor::Shape::dim(), and nncc::core::ADT::tensor::Shape::resize().

Referenced by nnkit::support::tflite::TensorContext::shape().