ONE - On-device Neural Engine
Loading...
Searching...
No Matches
package.infer.session Class Reference
Collaboration diagram for package.infer.session:

Public Member Functions

 __init__ (self, nnpackage_path, backends="cpu")
 
 set_inputs (self, size, inputs_array=[])
 
 set_outputs (self, size)
 
 inference (self)
 

Data Fields

 inputs
 
 outputs
 

Detailed Description

Class inherited nnfw_session for easily processing input/output

Definition at line 16 of file infer.py.

Constructor & Destructor Documentation

◆ __init__()

package.infer.session.__init__ (   self,
  nnpackage_path,
  backends = "cpu" 
)

Definition at line 18 of file infer.py.

18 def __init__(self, nnpackage_path, backends="cpu"):
19 super().__init__(nnpackage_path, backends)
20 self.inputs = []
21 self.outputs = []
22 self.set_outputs(self.output_size())
23

References package.infer.session.__init__().

Referenced by package.infer.session.__init__().

Member Function Documentation

◆ inference()

package.infer.session.inference (   self)
Inference model and get outputs

Definition at line 50 of file infer.py.

50 def inference(self):
51 """Inference model and get outputs"""
52 self.run()
53
54 return self.outputs
55
56

References Operation.outputs, Request.outputs, circlechef::CircleImport.outputs(), crew::Part.outputs, luci::CircleReader.outputs(), mio::circle::Reader.outputs(), moco::ModelSignature.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(), ann::Operation.outputs(), luci::PGroup.outputs, nnc::sir::CallFunction.outputs, nnkit::support::onnx::Runner.outputs(), loco::Graph.outputs(), validate_onnx2circle.OnnxRunner.outputs, onert_micro::execute::OMRuntimeKernel.outputs, nnfw_custom_kernel_params.outputs, package.infer.session.outputs, onert::exec::IODescription.outputs, nnkit::support::tf::Runner.run(), nnfw_session.run(), NNFW_SESSION.run(), onert::backend::acl_common::AclConstantInitializer.run(), onert::backend::cpu::ops::LogSoftMaxLayer.run(), onert::compiler::pass::PassRunner.run(), onert::exec::Job.run(), onert::compiler::pass::OperationPass.run(), onert::compiler::pass::UnusedOperandEliminationPass.run(), onert::compiler::train::pass::LossInsertionPass.run(), arm_compute::CLDirectTransposeConvLayer.run(), arm_compute::CLFullyConnectedHybridLayer.run(), arm_compute::weights_transformations::CLFullyConnectedLayerReshapeWeightsExManaged.run(), arm_compute::CLFullyConnectedLayerEx.run(), arm_compute::CLOneHot.run(), arm_compute::CLPadLayerEx.run(), arm_compute::CLReduceOperation.run(), arm_compute::CLSplitVEx.run(), arm_compute::CLTopKV2.run(), arm_compute::CLTransposeConvLayer.run(), arm_compute::NEFullyConnectedHybridLayer.run(), arm_compute::NEFullyConnectedLayerEx.run(), arm_compute::NEInstanceNormalizationLayerEx.run(), arm_compute::NEReduceOperation.run(), arm_compute::NEReduceSum.run(), arm_compute::NETransposeConvLayer.run(), onert::api::CustomKernel.run(), onert::backend::acl_common::AclFunction.run(), onert::backend::cpu::ops::AddNLayer.run(), onert::backend::cpu::ops::ArgMinMaxLayer.run(), onert::backend::cpu::ops::BatchMatMulLayer.run(), onert::backend::cpu::ops::BatchToSpaceNDLayer.run(), onert::backend::cpu::ops::BinaryArithmeticLayer.run(), onert::backend::cpu::ops::BroadcastToLayer.run(), onert::backend::cpu::ops::CompareLayer.run(), onert::backend::cpu::ops::ConcatLayer.run(), onert::backend::cpu::ops::ConvolutionLayer.run(), onert::backend::cpu::ops::DepthToSpaceLayer.run(), onert::backend::cpu::ops::DepthwiseConvolutionLayer.run(), onert::backend::cpu::ops::DetectionPostProcessLayer.run(), onert::backend::cpu::ops::EinsumLayer.run(), onert::backend::cpu::ops::ElementwiseActivationLayer.run(), onert::backend::cpu::ops::ElementwiseBinaryLayer.run(), onert::backend::cpu::ops::ElementwiseUnaryLayer.run(), onert::backend::cpu::ops::ExpandDimsLayer.run(), onert::backend::cpu::ops::FillLayer.run(), onert::backend::cpu::ops::FullyConnectedLayer.run(), onert::backend::cpu::ops::FusedBatchNormLayer.run(), onert::backend::cpu::ops::GatherLayer.run(), onert::backend::cpu::ops::L2NormLayer.run(), onert::backend::cpu::ops::LSTMLayer.run(), onert::backend::cpu::ops::MatrixBandPartLayer.run(), onert::backend::cpu::ops::MeanLayer.run(), onert::backend::cpu::ops::OneHotLayer.run(), onert::backend::cpu::ops::PackLayer.run(), onert::backend::cpu::ops::PadLayer.run(), onert::backend::cpu::ops::PoolLayer.run(), onert::backend::cpu::ops::PowLayer.run(), onert::backend::cpu::ops::QuantizeLayer.run(), onert::backend::cpu::ops::RangeLayer.run(), onert::backend::cpu::ops::RankLayer.run(), onert::backend::cpu::ops::ReduceLayer.run(), onert::backend::cpu::ops::ReshapeLayer.run(), onert::backend::cpu::ops::ResizeBilinearLayer.run(), onert::backend::cpu::ops::ReverseLayer.run(), onert::backend::cpu::ops::RmsNormLayer.run(), onert::backend::cpu::ops::RoPELayer.run(), onert::backend::cpu::ops::SelectLayer.run(), onert::backend::cpu::ops::ShapeLayer.run(), onert::backend::cpu::ops::SliceLayer.run(), onert::backend::cpu::ops::SoftMaxLayer.run(), onert::backend::cpu::ops::SpaceToBatchNDLayer.run(), onert::backend::cpu::ops::SpaceToDepthLayer.run(), onert::backend::cpu::ops::SplitLayer.run(), onert::backend::cpu::ops::SplitVLayer.run(), onert::backend::cpu::ops::SqDiffLayer.run(), onert::backend::cpu::ops::StatelessRandomUniformLayer.run(), onert::backend::cpu::ops::StridedSliceLayer.run(), onert::backend::cpu::ops::TileLayer.run(), onert::backend::cpu::ops::TransposeLayer.run(), onert::backend::cpu::ops::UnpackLayer.run(), onert::backend::ruy::ops::ConvolutionLayer.run(), onert::backend::ruy::ops::FullyConnectedLayer.run(), onert::backend::trix::ops::BulkLayer.run(), onert::backend::xnnpack::ops::ConvolutionLayer.run(), onert::backend::xnnpack::ops::DepthwiseConvolutionLayer.run(), onert::backend::xnnpack::ops::FullyConnectedLayer.run(), onert::exec::FunctionSequence.run(), onert::exec::NopFunction.run(), onert::backend::builtin::kernel::IfLayer.run(), onert::backend::builtin::kernel::PermuteLayer.run(), onert::backend::builtin::kernel::WhileLayer.run(), onert::compiler::pass::OddOutputPass.run(), onert::exec::IPermuteFunction.run(), onert::exec::HookFunction.run(), onert::compiler::pass::OperandPass.run(), onert::exec::IFunction.run(), onert::compiler::pass::IPass.run(), onert::compiler::pass::Pass.run(), mir_interpreter::AvgPool2DImpl< uint8_t >.run(), mir_interpreter::AvgPool2DImpl< T >.run(), mir_interpreter::DepthwiseConv2DImpl< T >.run(), mir_interpreter::DepthwiseConv2DImpl< uint8_t >.run(), mir_interpreter::SliceImpl< T >.run(), mir_interpreter::ELUImpl< T >.run(), mir_interpreter::LeakyReLUImpl< T >.run(), mir_interpreter::CappedReLUImpl< T >.run(), mir_interpreter::CappedReLUImpl< uint8_t >.run(), mir_interpreter::SoftmaxImpl< T >.run(), mir_interpreter::AbsImpl< T >.run(), mir_interpreter::AbsImpl< uint8_t >.run(), mir_interpreter::ReLUImpl< T >.run(), mir_interpreter::ReLUImpl< uint8_t >.run(), mir_interpreter::SigmoidImpl< T >.run(), mir_interpreter::SigmoidImpl< uint8_t >.run(), mir_interpreter::SqrtImpl< T >.run(), mir_interpreter::SqrtImpl< uint8_t >.run(), mir_interpreter::TanhImpl< T >.run(), mir_interpreter::TanhImpl< uint8_t >.run(), mir_interpreter::MaxPool2DImpl< uint8_t >.run(), mir_interpreter::TransposeImpl< T >.run(), mir_interpreter::SoftmaxImpl< uint8_t >.run(), mir_interpreter::HardSwishImpl< T >.run(), mir_interpreter::HardSwishImpl< uint8_t >.run(), mir_interpreter::MaxPool2DImpl< T >.run(), mir_interpreter::PadImpl< T >.run(), mir_interpreter::ReduceMeanImpl< T >.run(), mir_interpreter::FullyConnectedImpl< T >.run(), mir_interpreter::FullyConnectedImpl< uint8_t >.run(), Executor.run(), onert_micro::core::OMRuntimeModule.run(), onert_micro::OMInterpreter.run(), onert_micro::OMTrainingInterpreter.run(), logo::PhaseRunner< PhaseStrategy::Saturate >.run(), logo::PhaseRunner< PhaseStrategy::Restart >.run(), luci::PhaseRunner< logo::PhaseStrategy::Saturate >.run(), luci::PhaseRunner< logo::PhaseStrategy::Restart >.run(), enco::Pass.run(), enco::AvgPoolLoweringPass.run(), enco::ConcatLoweringPass.run(), enco::ConstantFoldingPass.run(), enco::CopyLoweringPass.run(), enco::DataLayoutConversionPass.run(), enco::DeadBagEliminationPass.run(), enco::DeadObjectEliminationPass.run(), enco::BagDuplicationPass.run(), enco::DuplicatedObjectReductionPass.run(), enco::FeatureUnificationPass.run(), enco::FreeInstrEliminationPass.run(), enco::FreeOpEliminationPass.run(), enco::IdenticalObjectReductionPass.run(), enco::IndirectCopyEliminationPass.run(), enco::IntrinsicSelectionPass.run(), enco::BypassGenerationPass.run(), enco::PhaseConstructionPass.run(), VerifyFlatbuffers.run(), mpqsolver::bisection::BisectionSolver.run(), mpqsolver::pattern::PatternSolver.run(), mpqsolver::MPQSolver.run(), mir_interpreter::ConcatImpl< T >.run(), mir_interpreter::ConcatImpl< uint8_t >.run(), mir_interpreter::GatherByT< T >.run(), mir_interpreter::GatherImpl< T, IndicesT >.run(), mir_interpreter::Conv2DImpl< T >.run(), mir_interpreter::Conv2DImpl< uint8_t >.run(), mir_interpreter::DeConv2DImpl< T >.run(), mir_interpreter::AddImpl< T >.run(), mir_interpreter::AddImpl< uint8_t >.run(), mir_interpreter::DivImpl< T >.run(), mir_interpreter::DivImpl< uint8_t >.run(), mir_interpreter::EqualImpl< T >.run(), mir_interpreter::GreaterImpl< T >.run(), mir_interpreter::LessImpl< T >.run(), mir_interpreter::MaxImpl< T >.run(), mir_interpreter::MaxImpl< uint8_t >.run(), mir_interpreter::MulImpl< T >.run(), mir_interpreter::MulImpl< uint8_t >.run(), mir_interpreter::SubImpl< T >.run(), mir_interpreter::SubImpl< uint8_t >.run(), arm_compute::CLBinaryLogicalOpKernel.run(), arm_compute::CLEmbeddingLookupKernel.run(), arm_compute::CLGatherExKernel.run(), arm_compute::CLGEMMMatrixAccumulateBiasesKernel.run(), arm_compute::CLHashtableLookupKernel.run(), arm_compute::CLInstanceNormalizationLayerKernelEx.run(), arm_compute::CLMemsetKernel.run(), arm_compute::CLMultiplyScaleFactorKernel.run(), arm_compute::CLNegKernel.run(), arm_compute::CLOneHotKernel.run(), arm_compute::CLPadLayerKernelEx.run(), arm_compute::CLQuantizationSymmetricKernel.run(), arm_compute::CLReduceOperationKernel.run(), arm_compute::CLScaleFactorSymm8Kernel.run(), arm_compute::NECastBoolKernel.run(), arm_compute::NEEmbeddingLookupKernel.run(), arm_compute::NEGatherKernelEx.run(), arm_compute::NEGEMMMatrixAccumulateBiasesKernel.run(), arm_compute::NEHashtableLookupKernel.run(), arm_compute::NEInstanceNormalizationLayerKernelEx.run(), arm_compute::NEMultiplyScaleFactorKernel.run(), arm_compute::NEOneHotKernel.run(), arm_compute::NEQuantizationSymmetricKernel.run(), cli::App.run(), cli::Command.run(), DecodeCommand.run(), EncodeCommand.run(), InitCommand.run(), MergeCommand.run(), cli::FunctionCommand.run(), tfkit::ConvertCommand.run(), tfkit::DecodeCommand.run(), tfkit::EncodeCommand.run(), tfkit::PackCommand.run(), tfkit::UnpackCommand.run(), exo::test::TypeShapeReadyPhase.run(), logo::RemoveDeadNodePass.run(), logo::RemoveDeadNodeWithQueryPass.run(), logo::ReorderDecodePass< loco::TensorBiasAdd >.run(), logo::ReorderDecodePass< loco::ReLU >.run(), luci::CircleTypeInferencePass.run(), exo::FoldReshapeOfConstPass.run(), exo::FoldTransposeOfConstPass.run(), exo::FuseBiasAddPass.run(), exo::FuseInstanceNormPass.run(), exo::FuseReluPass.run(), exo::FuseRsqrtPass.run(), exo::FuseSquaredDifferencePass.run(), logo::RemoveForwardNodePass.run(), logo::SimplifyDomainConversionPass.run(), luci::CanonicalizePass.run(), luci::ConvertNCHWToNHWCPass.run(), luci::ConvertToFakeQuantizedModelPass.run(), luci::DecomposeHardSwishPass.run(), luci::DecomposeSoftmaxPass.run(), luci::ExpandBroadcastConstPass.run(), luci::FoldAddV2Pass.run(), luci::FoldCastPass.run(), luci::FoldDensifyPass.run(), luci::FoldDepthwiseConv2DPass.run(), luci::FoldDequantizePass.run(), luci::FoldFullyConnectedPass.run(), luci::FoldGatherPass.run(), luci::FoldMulPass.run(), luci::FoldReshapePass.run(), luci::FoldShapePass.run(), luci::FoldSparseToDensePass.run(), luci::FoldSqueezePass.run(), luci::ForwardReshapeToUnaryOpPass.run(), luci::ForwardTransposeOpPass.run(), luci::FuseActivationFunctionPass.run(), luci::FuseAddToFullyConnectedBiasPass.run(), luci::FuseAddWithConvPass.run(), luci::FuseAddWithFullyConnectedPass.run(), luci::FuseAddWithTConvPass.run(), luci::FuseBatchNormWithConvPass.run(), luci::FuseBatchNormWithDwConvPass.run(), luci::FuseBatchNormWithTConvPass.run(), luci::FuseBCQPass.run(), luci::FuseGeluPass.run(), luci::FuseHorizontalFullyConnectedPass.run(), luci::FuseInstanceNormPass.run(), luci::FuseMeanWithMeanPass.run(), luci::FuseMulToFullyConnectedWeightsPass.run(), luci::FuseMulWithConvPass.run(), luci::FuseMulWithDivPass.run(), luci::FuseMulWithFullyConnectedPass.run(), luci::FusePreActivationBatchNormPass.run(), luci::FusePReluPass.run(), luci::FuseRmsNormPass.run(), luci::FuseRoPEPass.run(), luci::FuseRsqrtPass.run(), luci::FuseSliceWithTConvPass.run(), luci::FuseTransposeWithMeanPass.run(), luci::MakeBatchNormGammaPositivePass.run(), luci::PropagateQParamBackwardPass.run(), luci::PropagateQParamForwardPass.run(), luci::RemoveDuplicateConstPass.run(), luci::RemoveFakeQuantPass.run(), luci::RemoveGatherGuardPass.run(), luci::RemoveQDQForMixedPrecisionOpPass.run(), luci::RemoveQuantDequantSeqPass.run(), luci::RemoveRedundantDequantizePass.run(), luci::RemoveRedundantQuantizePass.run(), luci::RemoveRedundantReshapePass.run(), luci::RemoveRedundantTransposePass.run(), luci::RemoveUnnecessaryAddPass.run(), luci::RemoveUnnecessaryCastPass.run(), luci::RemoveUnnecessaryReshapeNetPass.run(), luci::RemoveUnnecessaryReshapePass.run(), luci::RemoveUnnecessarySlicePass.run(), luci::RemoveUnnecessarySplitPass.run(), luci::RemoveUnnecessaryStridedSlicePass.run(), luci::RemoveUnnecessaryTransposeNetPass.run(), luci::ReplaceMulAddWithDepthwiseConvPass.run(), luci::ReplaceNonConstFCWithBatchMatMulPass.run(), luci::ReplaceSubWithAddPass.run(), luci::ReplaceWithFCGeluFCPass.run(), luci::ResolveCustomOpAddPass.run(), luci::ResolveCustomOpBatchMatMulPass.run(), luci::ResolveCustomOpMatMulPass.run(), luci::ResolveCustomOpMaxPoolWithArgmaxPass.run(), luci::ResolveCustomOpSplitVPass.run(), luci::ResolveFormerCustomOpPass.run(), luci::ShuffleWeightTo16x1Float32Pass.run(), luci::SparsifyTensorPass.run(), luci::SubstituteExpandDimsToReshapePass.run(), luci::SubstitutePackToReshapePass.run(), luci::SubstitutePadV2ToPadPass.run(), luci::SubstituteSplitVToSplitPass.run(), luci::SubstituteSqueezeToReshapePass.run(), luci::SubstituteStridedSliceToReshapePass.run(), luci::SubstituteTransposeToReshapePass.run(), luci::TransformMinMaxToRelu6Pass.run(), luci::TransformMinReluToRelu6Pass.run(), luci::TransformSqrtDivToRsqrtMulPass.run(), luci::UnrollUnidirectionalSequenceLSTMPass.run(), luci::XpSepActFromTransposeConvPass.run(), luci::QuantizeOnnxDequantizeLinearPass.run(), luci::QuantizeOnnxQDQPass.run(), luci::QuantizeWithPredecessorPass.run(), moco::RemoveTFIdentityNode.run(), exo::CanonicalNodeConverter< loco::ReLU6 >.run(), exo::CanonicalNodeConverter< loco::DepthwiseConv2D >.run(), exo::CanonicalNodeConverter< loco::EltwiseMul >.run(), exo::CanonicalNodeConverter< loco::EltwiseSqrt >.run(), exo::CanonicalNodeConverter< loco::ConstGen >.run(), exo::CanonicalNodeConverter< loco::MatMul >.run(), exo::CanonicalNodeConverter< loco::EltwiseAdd >.run(), exo::CanonicalNodeConverter< loco::AvgPool2D >.run(), exo::CanonicalNodeConverter< loco::EltwiseMax >.run(), exo::CanonicalNodeConverter< loco::EltwiseSub >.run(), exo::CanonicalNodeConverter< loco::ReLU >.run(), exo::CanonicalNodeConverter< CanonicalType >.run(), exo::CanonicalNodeConverter< loco::EltwiseDiv >.run(), exo::CanonicalNodeConverter< loco::FeatureBiasAdd >.run(), exo::CanonicalNodeConverter< loco::Conv2D >.run(), exo::CanonicalNodeConverter< loco::MaxPool2D >.run(), exo::CanonicalNodeConverter< loco::TransposedConv2D >.run(), exo::CanonicalNodeConverter< loco::TensorConcat >.run(), exo::CanonicalNodeConverter< loco::TensorTranspose >.run(), exo::CanonicalNodeConverter< loco::TensorReduce >.run(), exo::TensorBroadcastConverter.run(), exo::MergeConcatNodesPass.run(), exo::ShapeInferencePass.run(), exo::TypeInferencePass.run(), fme_apply::InsertScaleShift.run(), fme_apply::FusePostScalePass.run(), fme_apply::FusePreScalePass.run(), luci::CircleShapeInferencePass.run(), luci::CommonSubExpressionEliminationPass.run(), luci::CopyQuantParamPass.run(), luci::DynamicBatchToSingleBatchPass.run(), luci::ForceQuantParamPass.run(), luci::QuantizeDequantizeWeightsPass.run(), luci::QuantizeDequantizeWeightsWithGPTQPass.run(), luci::QuantizeOnnxFakeQuantModelPass.run(), luci::QuantizeWeightsPass.run(), luci::QuantizeWithMinMaxPass.run(), luci::RequantizePass.run(), luci::QuantizePreCheckerPass.run(), moco::tf::SimpleNodeTransform< ConcreteNode >.run(), moco::tf::SimpleNodeTransform< moco::TFTanh >.run(), moco::tf::SimpleNodeTransform< moco::TFPush >.run(), moco::tf::SimpleNodeTransform< moco::TFStopGradient >.run(), moco::tf::SimpleNodeTransform< moco::TFSqrt >.run(), moco::tf::SimpleNodeTransform< moco::TFSoftmax >.run(), moco::tf::SimpleNodeTransform<::moco::TFPlaceholder >.run(), moco::tf::SimpleNodeTransform< moco::TFMul >.run(), moco::tf::SimpleNodeTransform< moco::TFMean >.run(), moco::tf::SimpleNodeTransform< moco::TFMaximum >.run(), moco::tf::SimpleNodeTransform< moco::TFIdentity >.run(), moco::tf::SimpleNodeTransform< moco::TFConst >.run(), moco::tf::SimpleNodeTransform< moco::TFAvgPool >.run(), moco::tf::SimpleNodeTransform< TFAdd >.run(), moco::tf::SimpleNodeTransform< moco::TFRealDiv >.run(), moco::tf::SimpleNodeTransform< moco::TFBiasAdd >.run(), moco::tf::SimpleNodeTransform< moco::TFConv2DBackpropInput >.run(), moco::tf::SimpleNodeTransform< moco::TFMaxPool >.run(), moco::tf::SimpleNodeTransform< TFConv2D >.run(), moco::tf::SimpleNodeTransform< moco::TFPad >.run(), moco::tf::SimpleNodeTransform< moco::TFConcatV2 >.run(), moco::tf::SimpleNodeTransform< moco::TFRsqrt >.run(), moco::tf::SimpleNodeTransform< moco::TFSqueeze >.run(), moco::tf::SimpleNodeTransform< moco::TFReshape >.run(), moco::tf::SimpleNodeTransform< moco::TFDepthwiseConv2dNative >.run(), moco::tf::SimpleNodeTransform< moco::TFSub >.run(), moco::tf::SimpleNodeTransform< moco::TFRelu >.run(), moco::tf::SimpleNodeTransform< moco::TFRelu6 >.run(), logo::ConstantFoldingPass.run(), logo::ResolveDuplicateReshapePass.run(), logo::ResolveRedundantReshapePass.run(), moco::tf::ShapeInferencePass.run(), moco::tf::TypeInferencePass.run(), moco::ConstantFoldAdd.run(), moco::ConstantFoldMul.run(), moco::ConstantFoldPack.run(), moco::ConstantFoldStridedSlice.run(), moco::FuseBinaryIntoPreceding.run(), moco::ResolveConstantShape.run(), moco::ResolveFusedBatchNorm.run(), moco::ResolveReshapeWildcardDim.run(), moco::ResolveSquaredDifference.run(), moco::SqueezeReduceNode.run(), logo::Pass.run(), locomotiv::NodeExecution.run(), luci::Pass.run(), luci::CircleShapeInferencePass.run(), luci::CircleTypeInferencePass.run(), luci::FuseBCQPass.run(), nnc::InterpreterBackend.run(), nnc::AclCppCodeGenerator.run(), nnc::CPPCodeGenerator.run(), mir_interpreter::FillImpl< T >.run(), ShowAction.run(), nnc::DumperPass.run(), nnc::CombineTransposes.run(), nnc::ConstantFoldTranspose.run(), nnc::DeadCodeElimination.run(), nnc::FuseArithmeticOps.run(), nnc::SinkRelu.run(), nnc::SinkTranspose.run(), nnc::DataFormatSwitcher.run(), nnc::LowerConv2D.run(), DummyPass1.run(), DummyPass2.run(), nnc::Pass.run(), Command.Command.run(), validate_onnx2circle.OnnxRunner.run(), test_utils.TestRunner.run(), QErrorComputer.QErrorComputer.run(), QErrorComputer.MPEIRComputer.run(), QErrorComputer.MSEComputer.run(), QErrorComputer.TAEComputer.run(), QErrorComputer.SRMSEComputer.run(), CfgRunner.CfgRunner.run(), WorkflowRunner.WorkflowRunner.run(), cirops::DumpOperators.run(), circletensordump::DumpTensors.run(), circletensordump::DumpTensorsToHdf5.run(), circletensordump::DumpInterface.run(), circleinspect::DumpOperators.run(), circleinspect::DumpConv2DWeight.run(), circleinspect::DumpOperatorVersion.run(), circleinspect::DumpTensorDType.run(), circleinspect::DumpConstants.run(), circleinspect::DumpTensorShape.run(), circleinspect::DumpInterface.run(), tflinspect::DumpOperators.run(), tflinspect::DumpConv2DWeight.run(), tflinspect::DumpOperatorVersion.run(), tflinspect::DumpInterface.run(), RandomizeAction.run(), HD5ExportAction.run(), HD5ImportAction.run(), nnkit::Action.run(), moco::tf::test::TFNodeBuildTester.run(), moco::test::TFNodeBuildTester.run(), prunner::PModelsRunner.run(), nnkit::support::onnx::Runner.run(), nnkit::support::caffe::Backend< DType >.run(), nnkit::support::moco::tf::Backend.run(), nnkit::support::onnx::Backend.run(), nnkit::support::tf::Backend.run(), nnkit::support::tflite::AbstractBackend.run(), arm_compute::CLFullyConnectedReshapingLayer.run(), arm_compute::NEFullyConnectedReshapingLayer.run(), and nnkit::Backend.run().

◆ set_inputs()

package.infer.session.set_inputs (   self,
  size,
  inputs_array = [] 
)
Set inputs for each index

Definition at line 24 of file infer.py.

24 def set_inputs(self, size, inputs_array=[]):
25 """Set inputs for each index"""
26 for i in range(size):
27 input_tensorinfo = self.input_tensorinfo(i)
28
29 if len(inputs_array) > i:
30 input_array = np.array(inputs_array[i], dtype=input_tensorinfo.dtype)
31 else:
32 print(
33 f"model's input size is {size} but given inputs_array size is {len(inputs_array)}.\n{i}-th index input is replaced by an array filled with 0."
34 )
35 input_array = np.zeros((num_elems(input_tensorinfo)),
36 dtype=input_tensorinfo.dtype)
37
38 self.set_input(i, input_array)
39 self.inputs.append(input_array)
40
uint64_t num_elems(const nnfw_tensorinfo *tensor_info)
Get the total number of elements in nnfw_tensorinfo->dims.

References NNFW_SESSION.input_tensorinfo(), nnfw_session.input_tensorinfo(), 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(), nnc::sir::CallFunction.inputs, validate_onnx2circle.OnnxRunner.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(), nnkit::support::onnx::Runner.inputs(), ann::Operation.inputs(), loco::Graph.inputs(), luci::CircleFakeQuant.inputs(), moco::TFFakeQuantWithMinMaxVars.inputs(), onert_micro::execute::OMRuntimeKernel.inputs, nnfw_custom_kernel_params.inputs, package.infer.session.inputs, onert::exec::IODescription.inputs, package.infer.num_elems(), nnfw_session.set_input(), NNFW_SESSION.set_input(), and locomotiv::Session.set_input().

◆ set_outputs()

Field Documentation

◆ inputs

package.infer.session.inputs

◆ outputs

package.infer.session.outputs

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