Struct opencv::dnn::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 allocate() methods to declare own outputs and forward() 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_: &FileNode) -> 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 FileStorage) -> Result<()>

Stores algorithm parameters in a file storage
source§

fn write_1(&self, fs: &mut FileStorage, 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 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: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

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

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

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

Return the underlying mutable raw pointer 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<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<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<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<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<GatherLayer> for Layer

source§

fn from(s: GatherLayer) -> 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<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<Layer> for Algorithm

source§

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

source§

fn from(s: ReduceLayerInt8) -> 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<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 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: &dyn ToInputArray, outputs: &mut dyn 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: &dyn ToInputArray, outputs: &mut dyn ToOutputArray, internals: &mut dyn 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 LayerParams ) -> 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: &dyn ToInputArray, outputs: &mut dyn ToOutputArray, internals: &mut dyn 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<dyn BackendWrapper>> ) -> Result<Ptr<BackendNode>>

Returns Halide backend node. Read more
source§

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

source§

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

source§

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

source§

unsafe fn init_cuda( &mut self, context: *mut c_void, inputs: &Vector<Ptr<dyn BackendWrapper>>, outputs: &Vector<Ptr<dyn 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<dyn BackendWrapper>>, outputs_wrapper: &Vector<Ptr<dyn BackendWrapper>>, is_last: bool ) -> Result<Ptr<BackendNode>>

Returns a TimVX backend node Read more
source§

fn init_cann( &mut self, inputs_wrapper: &Vector<Ptr<dyn BackendWrapper>>, index: i32, 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: &LayerParams) -> 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 Mat, shift: &mut Mat) -> 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 AccumLayer

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl !Sync for Layer

§

impl Unpin for Layer

§

impl UnwindSafe for Layer

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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<T, U> TryFrom<U> for Twhere 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 Twhere 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.