ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert.common.basesession Namespace Reference

Data Structures

class  BaseSession
 

Functions

 num_elems (tensor_info)
 

Function Documentation

◆ num_elems()

onert.common.basesession.num_elems (   tensor_info)
Get the total number of elements in nnfw_tensorinfo.dims.

Definition at line 8 of file basesession.py.

8def num_elems(tensor_info):
9 """Get the total number of elements in nnfw_tensorinfo.dims."""
10 n = 1
11 for x in range(tensor_info.rank):
12 n *= tensor_info.dims[x]
13 return n
14
15
uint64_t num_elems(const nnfw_tensorinfo *ti)
Definition minimal.cc:21

Referenced by onert.common.basesession.BaseSession.set_inputs().