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

Data Structures

class  BaseSession
 

Functions

 num_elems (tensor_info)
 
 tensorinfo ()
 

Function Documentation

◆ num_elems()

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

Definition at line 6 of file basesession.py.

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

Referenced by package.common.basesession.BaseSession.set_inputs(), and package.common.basesession.BaseSession.set_outputs().

◆ tensorinfo()

package.common.basesession.tensorinfo ( )

Definition at line 99 of file basesession.py.

99def tensorinfo():
100 return libnnfw_api_pybind.infer.nnfw_tensorinfo()