Layer

Struct Layer 

Source
pub struct Layer { /* private fields */ }
Expand description

This interface class allows to build new Layers - are building blocks of networks.

Each class, derived from Layer, must implement forward() method to compute outputs. Also before using the new layer into networks you must register your layer by using one of [dnnLayerFactory] “LayerFactory” macros.

Implementations§

Trait Implementations§

Source§

impl AlgorithmTrait for Layer

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 Layer

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 Boxed for Layer

Source§

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

Wrap the specified raw pointer Read more
Source§

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

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

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

Return the underlying raw pointer. Read more
Source§

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

Return the underlying mutable raw pointer Read more
Source§

impl Debug for Layer

Source§

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

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

impl Drop for Layer

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<AbsLayer> for Layer

Source§

fn from(s: AbsLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AccumLayer> for Layer

Source§

fn from(s: AccumLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AcosLayer> for Layer

Source§

fn from(s: AcosLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AcoshLayer> for Layer

Source§

fn from(s: AcoshLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ActivationLayer> for Layer

Source§

fn from(s: ActivationLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ActivationLayerInt8> for Layer

Source§

fn from(s: ActivationLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<ArgLayer> for Layer

Source§

fn from(s: ArgLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AsinLayer> for Layer

Source§

fn from(s: AsinLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AsinhLayer> for Layer

Source§

fn from(s: AsinhLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AtanLayer> for Layer

Source§

fn from(s: AtanLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AtanhLayer> for Layer

Source§

fn from(s: AtanhLayer) -> Self

Converts to this type from the input type.
Source§

impl From<AttentionLayer> for Layer

Source§

fn from(s: AttentionLayer) -> Self

Converts to this type from the input type.
Source§

impl From<BNLLLayer> for Layer

Source§

fn from(s: BNLLLayer) -> Self

Converts to this type from the input type.
Source§

impl From<BaseConvolutionLayer> for Layer

Source§

fn from(s: BaseConvolutionLayer) -> Self

Converts to this type from the input type.
Source§

impl From<BatchNormLayer> for Layer

Source§

fn from(s: BatchNormLayer) -> Self

Converts to this type from the input type.
Source§

impl From<BatchNormLayerInt8> for Layer

Source§

fn from(s: BatchNormLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<BlankLayer> for Layer

Source§

fn from(s: BlankLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CeilLayer> for Layer

Source§

fn from(s: CeilLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CeluLayer> for Layer

Source§

fn from(s: CeluLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ChannelsPReLULayer> for Layer

Source§

fn from(s: ChannelsPReLULayer) -> Self

Converts to this type from the input type.
Source§

impl From<CompareLayer> for Layer

Source§

fn from(s: CompareLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ConcatLayer> for Layer

Source§

fn from(s: ConcatLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ConstLayer> for Layer

Source§

fn from(s: ConstLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ConvolutionLayer> for Layer

Source§

fn from(s: ConvolutionLayer) -> 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 From<CorrelationLayer> for Layer

Source§

fn from(s: CorrelationLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CosLayer> for Layer

Source§

fn from(s: CosLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CoshLayer> for Layer

Source§

fn from(s: CoshLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CropAndResizeLayer> for Layer

Source§

fn from(s: CropAndResizeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CropLayer> for Layer

Source§

fn from(s: CropLayer) -> Self

Converts to this type from the input type.
Source§

impl From<CumSumLayer> for Layer

Source§

fn from(s: CumSumLayer) -> Self

Converts to this type from the input type.
Source§

impl From<DataAugmentationLayer> for Layer

Source§

fn from(s: DataAugmentationLayer) -> Self

Converts to this type from the input type.
Source§

impl From<DeconvolutionLayer> for Layer

Source§

fn from(s: DeconvolutionLayer) -> Self

Converts to this type from the input type.
Source§

impl From<DepthToSpaceLayer> for Layer

Source§

fn from(s: DepthToSpaceLayer) -> Self

Converts to this type from the input type.
Source§

impl From<DequantizeLayer> for Layer

Source§

fn from(s: DequantizeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<DetectionOutputLayer> for Layer

Source§

fn from(s: DetectionOutputLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ELULayer> for Layer

Source§

fn from(s: ELULayer) -> Self

Converts to this type from the input type.
Source§

impl From<EinsumLayer> for Layer

Source§

fn from(s: EinsumLayer) -> Self

Converts to this type from the input type.
Source§

impl From<EltwiseLayer> for Layer

Source§

fn from(s: EltwiseLayer) -> Self

Converts to this type from the input type.
Source§

impl From<EltwiseLayerInt8> for Layer

Source§

fn from(s: EltwiseLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<ErfLayer> for Layer

Source§

fn from(s: ErfLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ExpLayer> for Layer

Source§

fn from(s: ExpLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ExpandLayer> for Layer

Source§

fn from(s: ExpandLayer) -> Self

Converts to this type from the input type.
Source§

impl From<FlattenLayer> for Layer

Source§

fn from(s: FlattenLayer) -> Self

Converts to this type from the input type.
Source§

impl From<FloorLayer> for Layer

Source§

fn from(s: FloorLayer) -> Self

Converts to this type from the input type.
Source§

impl From<FlowWarpLayer> for Layer

Source§

fn from(s: FlowWarpLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GRULayer> for Layer

Source§

fn from(s: GRULayer) -> Self

Converts to this type from the input type.
Source§

impl From<GatherElementsLayer> for Layer

Source§

fn from(s: GatherElementsLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GatherLayer> for Layer

Source§

fn from(s: GatherLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GeluApproximationLayer> for Layer

Source§

fn from(s: GeluApproximationLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GeluLayer> for Layer

Source§

fn from(s: GeluLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GemmLayer> for Layer

Source§

fn from(s: GemmLayer) -> Self

Converts to this type from the input type.
Source§

impl From<GroupNormLayer> for Layer

Source§

fn from(s: GroupNormLayer) -> Self

Converts to this type from the input type.
Source§

impl From<HardSigmoidLayer> for Layer

Source§

fn from(s: HardSigmoidLayer) -> Self

Converts to this type from the input type.
Source§

impl From<HardSwishLayer> for Layer

Source§

fn from(s: HardSwishLayer) -> Self

Converts to this type from the input type.
Source§

impl From<InnerProductLayer> for Layer

Source§

fn from(s: InnerProductLayer) -> Self

Converts to this type from the input type.
Source§

impl From<InnerProductLayerInt8> for Layer

Source§

fn from(s: InnerProductLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<InstanceNormLayer> for Layer

Source§

fn from(s: InstanceNormLayer) -> Self

Converts to this type from the input type.
Source§

impl From<InterpLayer> for Layer

Source§

fn from(s: InterpLayer) -> Self

Converts to this type from the input type.
Source§

impl From<LRNLayer> for Layer

Source§

fn from(s: LRNLayer) -> Self

Converts to this type from the input type.
Source§

impl From<LSTMLayer> for Layer

Source§

fn from(s: LSTMLayer) -> Self

Converts to this type from the input type.
Source§

impl From<Layer> for Algorithm

Source§

fn from(s: Layer) -> Self

Converts to this type from the input type.
Source§

impl From<LayerNormLayer> for Layer

Source§

fn from(s: LayerNormLayer) -> Self

Converts to this type from the input type.
Source§

impl From<LogLayer> for Layer

Source§

fn from(s: LogLayer) -> Self

Converts to this type from the input type.
Source§

impl From<MVNLayer> for Layer

Source§

fn from(s: MVNLayer) -> Self

Converts to this type from the input type.
Source§

impl From<MatMulLayer> for Layer

Source§

fn from(s: MatMulLayer) -> Self

Converts to this type from the input type.
Source§

impl From<MaxUnpoolLayer> for Layer

Source§

fn from(s: MaxUnpoolLayer) -> Self

Converts to this type from the input type.
Source§

impl From<MishLayer> for Layer

Source§

fn from(s: MishLayer) -> Self

Converts to this type from the input type.
Source§

impl From<NaryEltwiseLayer> for Layer

Source§

fn from(s: NaryEltwiseLayer) -> Self

Converts to this type from the input type.
Source§

impl From<NormalizeBBoxLayer> for Layer

Source§

fn from(s: NormalizeBBoxLayer) -> Self

Converts to this type from the input type.
Source§

impl From<NotLayer> for Layer

Source§

fn from(s: NotLayer) -> Self

Converts to this type from the input type.
Source§

impl From<PaddingLayer> for Layer

Source§

fn from(s: PaddingLayer) -> Self

Converts to this type from the input type.
Source§

impl From<PermuteLayer> for Layer

Source§

fn from(s: PermuteLayer) -> Self

Converts to this type from the input type.
Source§

impl From<PoolingLayer> for Layer

Source§

fn from(s: PoolingLayer) -> Self

Converts to this type from the input type.
Source§

impl From<PoolingLayerInt8> for Layer

Source§

fn from(s: PoolingLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<PowerLayer> for Layer

Source§

fn from(s: PowerLayer) -> Self

Converts to this type from the input type.
Source§

impl From<PriorBoxLayer> for Layer

Source§

fn from(s: PriorBoxLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ProposalLayer> for Layer

Source§

fn from(s: ProposalLayer) -> Self

Converts to this type from the input type.
Source§

impl From<QuantizeLayer> for Layer

Source§

fn from(s: QuantizeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<RNNLayer> for Layer

Source§

fn from(s: RNNLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ReLU6Layer> for Layer

Source§

fn from(s: ReLU6Layer) -> Self

Converts to this type from the input type.
Source§

impl From<ReLULayer> for Layer

Source§

fn from(s: ReLULayer) -> Self

Converts to this type from the input type.
Source§

impl From<ReciprocalLayer> for Layer

Source§

fn from(s: ReciprocalLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ReduceLayer> for Layer

Source§

fn from(s: ReduceLayer) -> Self

Converts to this type from the input type.
Source§

impl From<RegionLayer> for Layer

Source§

fn from(s: RegionLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ReorgLayer> for Layer

Source§

fn from(s: ReorgLayer) -> Self

Converts to this type from the input type.
Source§

impl From<RequantizeLayer> for Layer

Source§

fn from(s: RequantizeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ReshapeLayer> for Layer

Source§

fn from(s: ReshapeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ResizeLayer> for Layer

Source§

fn from(s: ResizeLayer) -> Self

Converts to this type from the input type.
Source§

impl From<RoundLayer> for Layer

Source§

fn from(s: RoundLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ScaleLayer> for Layer

Source§

fn from(s: ScaleLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ScaleLayerInt8> for Layer

Source§

fn from(s: ScaleLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<ScatterLayer> for Layer

Source§

fn from(s: ScatterLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ScatterNDLayer> for Layer

Source§

fn from(s: ScatterNDLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SeluLayer> for Layer

Source§

fn from(s: SeluLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ShiftLayer> for Layer

Source§

fn from(s: ShiftLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ShiftLayerInt8> for Layer

Source§

fn from(s: ShiftLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<ShrinkLayer> for Layer

Source§

fn from(s: ShrinkLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ShuffleChannelLayer> for Layer

Source§

fn from(s: ShuffleChannelLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SigmoidLayer> for Layer

Source§

fn from(s: SigmoidLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SignLayer> for Layer

Source§

fn from(s: SignLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SinLayer> for Layer

Source§

fn from(s: SinLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SinhLayer> for Layer

Source§

fn from(s: SinhLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SliceLayer> for Layer

Source§

fn from(s: SliceLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SoftmaxLayer> for Layer

Source§

fn from(s: SoftmaxLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SoftmaxLayerInt8> for Layer

Source§

fn from(s: SoftmaxLayerInt8) -> Self

Converts to this type from the input type.
Source§

impl From<SoftplusLayer> for Layer

Source§

fn from(s: SoftplusLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SoftsignLayer> for Layer

Source§

fn from(s: SoftsignLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SpaceToDepthLayer> for Layer

Source§

fn from(s: SpaceToDepthLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SplitLayer> for Layer

Source§

fn from(s: SplitLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SqrtLayer> for Layer

Source§

fn from(s: SqrtLayer) -> Self

Converts to this type from the input type.
Source§

impl From<SwishLayer> for Layer

Source§

fn from(s: SwishLayer) -> Self

Converts to this type from the input type.
Source§

impl From<TanHLayer> for Layer

Source§

fn from(s: TanHLayer) -> Self

Converts to this type from the input type.
Source§

impl From<TanLayer> for Layer

Source§

fn from(s: TanLayer) -> Self

Converts to this type from the input type.
Source§

impl From<ThresholdedReluLayer> for Layer

Source§

fn from(s: ThresholdedReluLayer) -> Self

Converts to this type from the input type.
Source§

impl From<TileLayer> for Layer

Source§

fn from(s: TileLayer) -> Self

Converts to this type from the input type.
Source§

impl From<TopKLayer> for Layer

Source§

fn from(s: TopKLayer) -> Self

Converts to this type from the input type.
Source§

impl LayerTrait for Layer

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 Layer

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 AbsLayer

Source§

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 TryFrom<Layer> for AccumLayer

Source§

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 TryFrom<Layer> for AcosLayer

Source§

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 TryFrom<Layer> for AcoshLayer

Source§

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 TryFrom<Layer> for ActivationLayer

Source§

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 TryFrom<Layer> for ActivationLayerInt8

Source§

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 TryFrom<Layer> for ArgLayer

Source§

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 TryFrom<Layer> for AsinLayer

Source§

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 TryFrom<Layer> for AsinhLayer

Source§

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 TryFrom<Layer> for AtanLayer

Source§

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 TryFrom<Layer> for AtanhLayer

Source§

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 TryFrom<Layer> for AttentionLayer

Source§

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 TryFrom<Layer> for BNLLLayer

Source§

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 TryFrom<Layer> for BaseConvolutionLayer

Source§

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 TryFrom<Layer> for BatchNormLayer

Source§

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 TryFrom<Layer> for BatchNormLayerInt8

Source§

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 TryFrom<Layer> for BlankLayer

Source§

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 TryFrom<Layer> for CeilLayer

Source§

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 TryFrom<Layer> for CeluLayer

Source§

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 TryFrom<Layer> for ChannelsPReLULayer

Source§

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 TryFrom<Layer> for CompareLayer

Source§

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 TryFrom<Layer> for ConcatLayer

Source§

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 TryFrom<Layer> for ConstLayer

Source§

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 TryFrom<Layer> for ConvolutionLayer

Source§

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 TryFrom<Layer> for ConvolutionLayerInt8

Source§

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 TryFrom<Layer> for CorrelationLayer

Source§

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 TryFrom<Layer> for CosLayer

Source§

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 TryFrom<Layer> for CoshLayer

Source§

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 TryFrom<Layer> for CropAndResizeLayer

Source§

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 TryFrom<Layer> for CropLayer

Source§

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 TryFrom<Layer> for CumSumLayer

Source§

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 TryFrom<Layer> for DataAugmentationLayer

Source§

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 TryFrom<Layer> for DeconvolutionLayer

Source§

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 TryFrom<Layer> for DepthToSpaceLayer

Source§

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 TryFrom<Layer> for DequantizeLayer

Source§

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 TryFrom<Layer> for DetectionOutputLayer

Source§

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 TryFrom<Layer> for ELULayer

Source§

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 TryFrom<Layer> for EinsumLayer

Source§

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 TryFrom<Layer> for EltwiseLayer

Source§

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 TryFrom<Layer> for EltwiseLayerInt8

Source§

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 TryFrom<Layer> for ErfLayer

Source§

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 TryFrom<Layer> for ExpLayer

Source§

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 TryFrom<Layer> for ExpandLayer

Source§

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 TryFrom<Layer> for FlattenLayer

Source§

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 TryFrom<Layer> for FloorLayer

Source§

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 TryFrom<Layer> for FlowWarpLayer

Source§

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 TryFrom<Layer> for GRULayer

Source§

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 TryFrom<Layer> for GatherElementsLayer

Source§

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 TryFrom<Layer> for GatherLayer

Source§

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 TryFrom<Layer> for GeluApproximationLayer

Source§

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 TryFrom<Layer> for GeluLayer

Source§

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 TryFrom<Layer> for GemmLayer

Source§

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 TryFrom<Layer> for GroupNormLayer

Source§

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 TryFrom<Layer> for HardSigmoidLayer

Source§

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 TryFrom<Layer> for HardSwishLayer

Source§

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 TryFrom<Layer> for InnerProductLayer

Source§

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 TryFrom<Layer> for InnerProductLayerInt8

Source§

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 TryFrom<Layer> for InstanceNormLayer

Source§

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 TryFrom<Layer> for InterpLayer

Source§

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 TryFrom<Layer> for LRNLayer

Source§

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 TryFrom<Layer> for LSTMLayer

Source§

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 TryFrom<Layer> for LayerNormLayer

Source§

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 TryFrom<Layer> for LogLayer

Source§

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 TryFrom<Layer> for MVNLayer

Source§

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 TryFrom<Layer> for MatMulLayer

Source§

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 TryFrom<Layer> for MaxUnpoolLayer

Source§

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 TryFrom<Layer> for MishLayer

Source§

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 TryFrom<Layer> for NaryEltwiseLayer

Source§

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 TryFrom<Layer> for NormalizeBBoxLayer

Source§

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 TryFrom<Layer> for NotLayer

Source§

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 TryFrom<Layer> for PaddingLayer

Source§

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 TryFrom<Layer> for PermuteLayer

Source§

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 TryFrom<Layer> for PoolingLayer

Source§

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 TryFrom<Layer> for PoolingLayerInt8

Source§

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 TryFrom<Layer> for PowerLayer

Source§

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 TryFrom<Layer> for PriorBoxLayer

Source§

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 TryFrom<Layer> for ProposalLayer

Source§

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 TryFrom<Layer> for QuantizeLayer

Source§

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 TryFrom<Layer> for RNNLayer

Source§

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 TryFrom<Layer> for ReLU6Layer

Source§

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 TryFrom<Layer> for ReLULayer

Source§

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 TryFrom<Layer> for ReciprocalLayer

Source§

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 TryFrom<Layer> for ReduceLayer

Source§

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 TryFrom<Layer> for RegionLayer

Source§

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 TryFrom<Layer> for ReorgLayer

Source§

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 TryFrom<Layer> for RequantizeLayer

Source§

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 TryFrom<Layer> for ReshapeLayer

Source§

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 TryFrom<Layer> for ResizeLayer

Source§

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 TryFrom<Layer> for RoundLayer

Source§

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 TryFrom<Layer> for ScaleLayer

Source§

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 TryFrom<Layer> for ScaleLayerInt8

Source§

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 TryFrom<Layer> for ScatterLayer

Source§

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 TryFrom<Layer> for ScatterNDLayer

Source§

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 TryFrom<Layer> for SeluLayer

Source§

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 TryFrom<Layer> for ShiftLayer

Source§

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 TryFrom<Layer> for ShiftLayerInt8

Source§

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 TryFrom<Layer> for ShrinkLayer

Source§

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 TryFrom<Layer> for ShuffleChannelLayer

Source§

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 TryFrom<Layer> for SigmoidLayer

Source§

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 TryFrom<Layer> for SignLayer

Source§

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 TryFrom<Layer> for SinLayer

Source§

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 TryFrom<Layer> for SinhLayer

Source§

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 TryFrom<Layer> for SliceLayer

Source§

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 TryFrom<Layer> for SoftmaxLayer

Source§

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 TryFrom<Layer> for SoftmaxLayerInt8

Source§

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 TryFrom<Layer> for SoftplusLayer

Source§

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 TryFrom<Layer> for SoftsignLayer

Source§

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 TryFrom<Layer> for SpaceToDepthLayer

Source§

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 TryFrom<Layer> for SplitLayer

Source§

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 TryFrom<Layer> for SqrtLayer

Source§

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 TryFrom<Layer> for SwishLayer

Source§

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 TryFrom<Layer> for TanHLayer

Source§

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 TryFrom<Layer> for TanLayer

Source§

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 TryFrom<Layer> for ThresholdedReluLayer

Source§

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 TryFrom<Layer> for TileLayer

Source§

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 TryFrom<Layer> for TopKLayer

Source§

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 Layer

Auto Trait Implementations§

§

impl Freeze for Layer

§

impl RefUnwindSafe for Layer

§

impl !Sync for Layer

§

impl Unpin for Layer

§

impl UnwindSafe for Layer

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 unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can 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>,

Source§

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>,

Source§

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.