Struct opencv::dnn::ConvolutionLayerInt8

source ·
pub struct ConvolutionLayerInt8 { /* private fields */ }

Implementations§

Trait Implementations§

source§

impl AlgorithmTrait for ConvolutionLayerInt8

source§

fn as_raw_mut_Algorithm(&mut self) -> *mut c_void

source§

fn clear(&mut self) -> Result<()>

Clears the algorithm state
source§

fn read(&mut self, fn_: &impl FileNodeTraitConst) -> Result<()>

Reads algorithm parameters from a file storage
source§

impl AlgorithmTraitConst for ConvolutionLayerInt8

source§

fn as_raw_Algorithm(&self) -> *const c_void

source§

fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>

Stores algorithm parameters in a file storage
source§

fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>

Stores algorithm parameters in a file storage Read more
source§

fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>

@deprecated Read more
source§

fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>

👎Deprecated:

§Note

Deprecated: ## Note This alternative version of AlgorithmTraitConst::write_with_name function uses the following default values for its arguments: Read more
source§

fn empty(&self) -> Result<bool>

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
source§

fn save(&self, filename: &str) -> Result<()>

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
source§

fn get_default_name(&self) -> Result<String>

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
source§

impl BaseConvolutionLayerTrait for ConvolutionLayerInt8

source§

fn as_raw_mut_BaseConvolutionLayer(&mut self) -> *mut c_void

source§

fn set_kernel(&mut self, val: Size)

source§

fn set_stride(&mut self, val: Size)

source§

fn set_pad(&mut self, val: Size)

source§

fn set_dilation(&mut self, val: Size)

source§

fn set_adjust_pad(&mut self, val: Size)

source§

fn set_adjust_pads(&mut self, val: Vector<size_t>)

source§

fn set_kernel_size(&mut self, val: Vector<size_t>)

source§

fn set_strides(&mut self, val: Vector<size_t>)

source§

fn set_dilations(&mut self, val: Vector<size_t>)

source§

fn set_pads_begin(&mut self, val: Vector<size_t>)

source§

fn set_pads_end(&mut self, val: Vector<size_t>)

source§

fn set_pad_mode(&mut self, val: &str)

source§

fn set_num_output(&mut self, val: i32)

source§

impl BaseConvolutionLayerTraitConst for ConvolutionLayerInt8

source§

impl Boxed for ConvolutionLayerInt8

source§

unsafe fn from_raw( ptr: <ConvolutionLayerInt8 as OpenCVFromExtern>::ExternReceive ) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw( self ) -> <ConvolutionLayerInt8 as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw( &self ) -> <ConvolutionLayerInt8 as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
source§

fn as_raw_mut( &mut self ) -> <ConvolutionLayerInt8 as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
source§

impl ConvolutionLayerInt8Trait for ConvolutionLayerInt8

source§

fn as_raw_mut_ConvolutionLayerInt8(&mut self) -> *mut c_void

source§

fn set_input_zp(&mut self, val: i32)

source§

fn set_output_zp(&mut self, val: i32)

source§

fn set_input_sc(&mut self, val: f32)

source§

fn set_output_sc(&mut self, val: f32)

source§

fn set_per_channel(&mut self, val: bool)

source§

fn set_use_winograd(&mut self, val: bool)

C++ default parameters Read more
source§

impl ConvolutionLayerInt8TraitConst for ConvolutionLayerInt8

source§

impl Debug for ConvolutionLayerInt8

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ConvolutionLayerInt8

source§

fn default() -> Self

Forwards to infallible Self::default()

source§

impl Drop for ConvolutionLayerInt8

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<ConvolutionLayerInt8> for Algorithm

source§

fn from(s: ConvolutionLayerInt8) -> Self

Converts to this type from the input type.
source§

impl From<ConvolutionLayerInt8> for BaseConvolutionLayer

source§

fn from(s: ConvolutionLayerInt8) -> Self

Converts to this type from the input type.
source§

impl From<ConvolutionLayerInt8> for Layer

source§

fn from(s: ConvolutionLayerInt8) -> Self

Converts to this type from the input type.
source§

impl LayerTrait for ConvolutionLayerInt8

source§

fn as_raw_mut_Layer(&mut self) -> *mut c_void

source§

fn set_blobs(&mut self, val: Vector<Mat>)

List of learned parameters must be stored here to allow read them by using Net::getParam().
source§

fn set_name(&mut self, val: &str)

Name of the layer instance, can be used for logging or other internal purposes.
source§

fn set_type(&mut self, val: &str)

Type name which was used for creating layer by layer factory.
source§

fn set_preferable_target(&mut self, val: i32)

prefer target for layer forwarding
source§

fn finalize( &mut self, inputs: &impl ToInputArray, outputs: &mut impl ToOutputArray ) -> Result<()>

Computes and sets internal parameters according to inputs, outputs and blobs. Read more
source§

fn forward_mat( &mut self, input: &mut Vector<Mat>, output: &mut Vector<Mat>, internals: &mut Vector<Mat> ) -> Result<()>

👎Deprecated: Use Layer::forward(InputArrayOfArrays, OutputArrayOfArrays, OutputArrayOfArrays) instead
Given the @p input blobs, computes the output @p blobs. Read more
source§

fn forward( &mut self, inputs: &impl ToInputArray, outputs: &mut impl ToOutputArray, internals: &mut impl ToOutputArray ) -> Result<()>

Given the @p input blobs, computes the output @p blobs. Read more
source§

fn try_quantize( &mut self, scales: &Vector<Vector<f32>>, zeropoints: &Vector<Vector<i32>>, params: &mut impl LayerParamsTrait ) -> Result<bool>

Tries to quantize the given layer and compute the quantization parameters required for fixed point implementation. Read more
source§

fn forward_fallback( &mut self, inputs: &impl ToInputArray, outputs: &mut impl ToOutputArray, internals: &mut impl ToOutputArray ) -> Result<()>

Given the @p input blobs, computes the output @p blobs. Read more
source§

fn finalize_mat_to( &mut self, inputs: &Vector<Mat>, outputs: &mut Vector<Mat> ) -> Result<()>

👎Deprecated: Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead
Computes and sets internal parameters according to inputs, outputs and blobs. Read more
source§

fn finalize_mat(&mut self, inputs: &Vector<Mat>) -> Result<Vector<Mat>>

👎Deprecated: Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead
Computes and sets internal parameters according to inputs, outputs and blobs. Read more
source§

fn run( &mut self, inputs: &Vector<Mat>, outputs: &mut Vector<Mat>, internals: &mut Vector<Mat> ) -> Result<()>

👎Deprecated: This method will be removed in the future release.
Allocates layer and computes output. Read more
source§

fn input_name_to_index(&mut self, input_name: &str) -> Result<i32>

Returns index of input blob into the input array. Read more
source§

fn output_name_to_index(&mut self, output_name: &str) -> Result<i32>

Returns index of output blob in output array. Read more
source§

fn support_backend(&mut self, backend_id: i32) -> Result<bool>

Ask layer if it support specific backend for doing computations. Read more
source§

fn init_halide( &mut self, inputs: &Vector<Ptr<BackendWrapper>> ) -> Result<Ptr<BackendNode>>

Returns Halide backend node. Read more
source§

fn init_ngraph( &mut self, inputs: &Vector<Ptr<BackendWrapper>>, nodes: &Vector<Ptr<BackendNode>> ) -> Result<Ptr<BackendNode>>

source§

fn init_vk_com( &mut self, inputs: &Vector<Ptr<BackendWrapper>>, outputs: &mut Vector<Ptr<BackendWrapper>> ) -> Result<Ptr<BackendNode>>

source§

fn init_webnn( &mut self, inputs: &Vector<Ptr<BackendWrapper>>, nodes: &Vector<Ptr<BackendNode>> ) -> Result<Ptr<BackendNode>>

source§

unsafe fn init_cuda( &mut self, context: *mut c_void, inputs: &Vector<Ptr<BackendWrapper>>, outputs: &Vector<Ptr<BackendWrapper>> ) -> Result<Ptr<BackendNode>>

Returns a CUDA backend node Read more
source§

unsafe fn init_tim_vx( &mut self, tim_vx_info: *mut c_void, inputs_wrapper: &Vector<Ptr<BackendWrapper>>, outputs_wrapper: &Vector<Ptr<BackendWrapper>>, is_last: bool ) -> Result<Ptr<BackendNode>>

Returns a TimVX backend node Read more
source§

fn init_cann( &mut self, inputs: &Vector<Ptr<BackendWrapper>>, outputs: &Vector<Ptr<BackendWrapper>>, nodes: &Vector<Ptr<BackendNode>> ) -> Result<Ptr<BackendNode>>

Returns a CANN backend node Read more
source§

fn try_attach(&mut self, node: &Ptr<BackendNode>) -> Result<Ptr<BackendNode>>

Implement layers fusing. Read more
source§

fn set_activation(&mut self, layer: &Ptr<ActivationLayer>) -> Result<bool>

Tries to attach to the layer the subsequent activation layer, i.e. do the layer fusion in a partial case. Read more
source§

fn try_fuse(&mut self, top: &mut Ptr<Layer>) -> Result<bool>

Try to fuse current layer with a next one Read more
source§

fn unset_attached(&mut self) -> Result<()>

“Detaches” all the layers, attached to particular layer.
source§

fn update_memory_shapes(&mut self, inputs: &Vector<MatShape>) -> Result<bool>

source§

fn set_params_from(&mut self, params: &impl LayerParamsTraitConst) -> Result<()>

source§

impl LayerTraitConst for ConvolutionLayerInt8

source§

fn as_raw_Layer(&self) -> *const c_void

source§

fn blobs(&self) -> Vector<Mat>

List of learned parameters must be stored here to allow read them by using Net::getParam().
source§

fn name(&self) -> String

Name of the layer instance, can be used for logging or other internal purposes.
source§

fn typ(&self) -> String

Type name which was used for creating layer by layer factory.
source§

fn preferable_target(&self) -> i32

prefer target for layer forwarding
source§

fn apply_halide_scheduler( &self, node: &mut Ptr<BackendNode>, inputs: &Vector<Mat>, outputs: &Vector<Mat>, target_id: i32 ) -> Result<()>

Automatic Halide scheduling based on layer hyper-parameters. Read more
source§

fn get_scale_shift( &self, scale: &mut impl MatTrait, shift: &mut impl MatTrait ) -> Result<()>

Returns parameters of layers with channel-wise multiplication and addition. Read more
source§

fn get_scale_zeropoint( &self, scale: &mut f32, zeropoint: &mut i32 ) -> Result<()>

Returns scale and zeropoint of layers Read more
source§

fn get_memory_shapes( &self, inputs: &Vector<MatShape>, required_outputs: i32, outputs: &mut Vector<MatShape>, internals: &mut Vector<MatShape> ) -> Result<bool>

source§

fn get_flops( &self, inputs: &Vector<MatShape>, outputs: &Vector<MatShape> ) -> Result<i64>

source§

impl TryFrom<Layer> for ConvolutionLayerInt8

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(s: Layer) -> Result<Self>

Performs the conversion.
source§

impl Send for ConvolutionLayerInt8

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.