ONE - On-device Neural Engine
|
Public Member Functions | |
__init__ (self, backend_session=None) | |
__getattr__ (self, name) | |
set_inputs (self, size, inputs_array=[]) | |
set_outputs (self, size) | |
Data Fields | |
session | |
inputs | |
outputs | |
Protected Member Functions | |
_recreate_session (self, backend_session) | |
Base class providing common functionality for inference and training sessions.
Definition at line 14 of file basesession.py.
package.common.basesession.BaseSession.__init__ | ( | self, | |
backend_session = None |
|||
) |
Initialize the BaseSession with a backend session. Args: backend_session: A backend-specific session object (e.g., nnfw_session).
Reimplemented in package.infer.session.session.
Definition at line 18 of file basesession.py.
package.common.basesession.BaseSession.__getattr__ | ( | self, | |
name | |||
) |
Delegate attribute access to the bound NNFW_SESSION instance. Args: name (str): The name of the attribute or method to access. Returns: The attribute or method from the bound NNFW_SESSION instance.
Definition at line 28 of file basesession.py.
References validate_onnx2circle.OnnxRunner.session, onert::api::python::NNFW_SESSION.session, and package.common.basesession.BaseSession.session.
|
protected |
Protected method to recreate the session. Subclasses can override this method to provide custom session recreation logic.
Definition at line 46 of file basesession.py.
References validate_onnx2circle.OnnxRunner.session, onert::api::python::NNFW_SESSION.session, and package.common.basesession.BaseSession.session.
Referenced by package.infer.session.session.compile().
package.common.basesession.BaseSession.set_inputs | ( | self, | |
size, | |||
inputs_array = [] |
|||
) |
Set the input tensors for the session. Args: size (int): Number of input tensors. inputs_array (list): List of numpy arrays for the input data.
Definition at line 55 of file basesession.py.
References Operation.inputs, Request.inputs, circlechef::CircleImport.inputs(), crew::Part.inputs, luci::CircleReader.inputs(), luci::PGroup.inputs, luci::pass::Expression.inputs, mio::circle::Reader.inputs(), moco::ModelSignature.inputs(), tflinspect::Reader.inputs(), tflchef::TFliteImport.inputs(), tflread::Reader.inputs(), luci_interpreter::CircleReader.inputs(), onert_micro::core::reader::OMCircleReader.inputs(), moco::tf::test::TFNodeBuildTester.inputs(), moco::test::TFNodeBuildTester.inputs(), moco::test::TFNodeBuildTester.inputs(), luci::CircleFakeQuant.inputs(), moco::TFFakeQuantWithMinMaxVars.inputs(), luci::CircleAddN.inputs(), luci::CircleCustom.inputs(), luci::CircleAddN.inputs(), luci::CircleCustom.inputs(), loco::Graph.inputs(), nnc::sir::CallFunction.inputs, nnkit::support::onnx::Runner.inputs(), ann::Operation.inputs(), loco::Graph.inputs(), luci::CircleFakeQuant.inputs(), moco::TFFakeQuantWithMinMaxVars.inputs(), validate_onnx2circle.OnnxRunner.inputs, onert_micro::execute::OMRuntimeKernel.inputs, nnfw_custom_kernel_params.inputs, package.common.basesession.BaseSession.inputs, onert::exec::IODescription.inputs, package.common.basesession.num_elems(), validate_onnx2circle.OnnxRunner.session, onert::api::python::NNFW_SESSION.session, and package.common.basesession.BaseSession.session.
package.common.basesession.BaseSession.set_outputs | ( | self, | |
size | |||
) |
Set the output tensors for the session. Args: size (int): Number of output tensors.
Definition at line 81 of file basesession.py.
References package.common.basesession.num_elems(), Operation.outputs, Request.outputs, circlechef::CircleImport.outputs(), crew::Part.outputs, luci::CircleReader.outputs(), luci::PGroup.outputs, mio::circle::Reader.outputs(), moco::ModelSignature.outputs(), nnc::sir::CallFunction.outputs, validate_onnx2circle.OnnxRunner.outputs, tflinspect::Reader.outputs(), tflchef::TFliteImport.outputs(), tflread::Reader.outputs(), luci_interpreter::CircleReader.outputs(), onert_micro::core::reader::OMCircleReader.outputs(), mio::circle::Reader.outputs(), loco::Graph.outputs(), nnkit::support::onnx::Runner.outputs(), ann::Operation.outputs(), loco::Graph.outputs(), onert_micro::execute::OMRuntimeKernel.outputs, nnfw_custom_kernel_params.outputs, package.common.basesession.BaseSession.outputs, onert::exec::IODescription.outputs, validate_onnx2circle.OnnxRunner.session, onert::api::python::NNFW_SESSION.session, and package.common.basesession.BaseSession.session.
Referenced by package.infer.session.session.__init__(), and package.infer.session.session.compile().
package.common.basesession.BaseSession.inputs |
Definition at line 25 of file basesession.py.
Referenced by validate_onnx2circle.OnnxRunner.feed_random_inputs(), and package.common.basesession.BaseSession.set_inputs().
package.common.basesession.BaseSession.outputs |
Definition at line 26 of file basesession.py.
Referenced by validate_onnx2circle.OnnxRunner.get_outputs(), package.infer.session.session.inference(), and package.common.basesession.BaseSession.set_outputs().
package.common.basesession.BaseSession.session |
Definition at line 24 of file basesession.py.
Referenced by package.common.basesession.BaseSession.__getattr__(), package.infer.session.session.__init__(), package.common.basesession.BaseSession._recreate_session(), package.infer.session.session.compile(), validate_onnx2circle.OnnxRunner.feed_random_inputs(), validate_onnx2circle.OnnxRunner.get_outputs(), package.infer.session.session.inference(), validate_onnx2circle.OnnxRunner.load(), package.common.basesession.BaseSession.set_inputs(), and package.common.basesession.BaseSession.set_outputs().