Struct opencv::dnn::ActivationLayer
source · [−]pub struct ActivationLayer { /* private fields */ }
Trait Implementations
sourceimpl ActivationLayerTrait for ActivationLayer
impl ActivationLayerTrait for ActivationLayer
fn as_raw_mut_ActivationLayer(&mut self) -> *mut c_void
sourceimpl ActivationLayerTraitConst for ActivationLayer
impl ActivationLayerTraitConst for ActivationLayer
fn as_raw_ActivationLayer(&self) -> *const c_void
fn forward_slice(
&self,
src: &f32,
dst: &mut f32,
len: i32,
out_plane_size: size_t,
cn0: i32,
cn1: i32
) -> Result<()>
fn forward_slice_1(
&self,
src: &i32,
lut: &i32,
dst: &mut i32,
len: i32,
out_plane_size: size_t,
cn0: i32,
cn1: i32
) -> Result<()>
sourceimpl AlgorithmTrait for ActivationLayer
impl AlgorithmTrait for ActivationLayer
sourceimpl AlgorithmTraitConst for ActivationLayer
impl AlgorithmTraitConst for ActivationLayer
fn as_raw_Algorithm(&self) -> *const c_void
sourcefn write(&self, fs: &mut FileStorage) -> Result<()>
fn write(&self, fs: &mut FileStorage) -> Result<()>
Stores algorithm parameters in a file storage
sourcefn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
simplified API for language bindings Stores algorithm parameters in a file storage Read more
sourcefn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
sourcefn save(&self, filename: &str) -> Result<()>
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). Read more
sourcefn get_default_name(&self) -> Result<String>
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. Read more
sourceimpl Boxed for ActivationLayer
impl Boxed for ActivationLayer
sourceimpl Drop for ActivationLayer
impl Drop for ActivationLayer
sourceimpl From<AbsLayer> for ActivationLayer
impl From<AbsLayer> for ActivationLayer
sourceimpl From<AcosLayer> for ActivationLayer
impl From<AcosLayer> for ActivationLayer
sourceimpl From<AcoshLayer> for ActivationLayer
impl From<AcoshLayer> for ActivationLayer
sourcefn from(s: AcoshLayer) -> Self
fn from(s: AcoshLayer) -> Self
Converts to this type from the input type.
sourceimpl From<ActivationLayer> for Algorithm
impl From<ActivationLayer> for Algorithm
sourcefn from(s: ActivationLayer) -> Self
fn from(s: ActivationLayer) -> Self
Converts to this type from the input type.
sourceimpl From<ActivationLayer> for Layer
impl From<ActivationLayer> for Layer
sourcefn from(s: ActivationLayer) -> Self
fn from(s: ActivationLayer) -> Self
Converts to this type from the input type.
sourceimpl From<ActivationLayerInt8> for ActivationLayer
impl From<ActivationLayerInt8> for ActivationLayer
sourcefn from(s: ActivationLayerInt8) -> Self
fn from(s: ActivationLayerInt8) -> Self
Converts to this type from the input type.
sourceimpl From<AsinLayer> for ActivationLayer
impl From<AsinLayer> for ActivationLayer
sourceimpl From<AsinhLayer> for ActivationLayer
impl From<AsinhLayer> for ActivationLayer
sourcefn from(s: AsinhLayer) -> Self
fn from(s: AsinhLayer) -> Self
Converts to this type from the input type.
sourceimpl From<AtanLayer> for ActivationLayer
impl From<AtanLayer> for ActivationLayer
sourceimpl From<AtanhLayer> for ActivationLayer
impl From<AtanhLayer> for ActivationLayer
sourcefn from(s: AtanhLayer) -> Self
fn from(s: AtanhLayer) -> Self
Converts to this type from the input type.
sourceimpl From<BNLLLayer> for ActivationLayer
impl From<BNLLLayer> for ActivationLayer
sourceimpl From<BatchNormLayer> for ActivationLayer
impl From<BatchNormLayer> for ActivationLayer
sourcefn from(s: BatchNormLayer) -> Self
fn from(s: BatchNormLayer) -> Self
Converts to this type from the input type.
sourceimpl From<BatchNormLayerInt8> for ActivationLayer
impl From<BatchNormLayerInt8> for ActivationLayer
sourcefn from(s: BatchNormLayerInt8) -> Self
fn from(s: BatchNormLayerInt8) -> Self
Converts to this type from the input type.
sourceimpl From<CeilLayer> for ActivationLayer
impl From<CeilLayer> for ActivationLayer
sourceimpl From<CeluLayer> for ActivationLayer
impl From<CeluLayer> for ActivationLayer
sourceimpl From<ChannelsPReLULayer> for ActivationLayer
impl From<ChannelsPReLULayer> for ActivationLayer
sourcefn from(s: ChannelsPReLULayer) -> Self
fn from(s: ChannelsPReLULayer) -> Self
Converts to this type from the input type.
sourceimpl From<CosLayer> for ActivationLayer
impl From<CosLayer> for ActivationLayer
sourceimpl From<CoshLayer> for ActivationLayer
impl From<CoshLayer> for ActivationLayer
sourceimpl From<ELULayer> for ActivationLayer
impl From<ELULayer> for ActivationLayer
sourceimpl From<ErfLayer> for ActivationLayer
impl From<ErfLayer> for ActivationLayer
sourceimpl From<ExpLayer> for ActivationLayer
impl From<ExpLayer> for ActivationLayer
sourceimpl From<FloorLayer> for ActivationLayer
impl From<FloorLayer> for ActivationLayer
sourcefn from(s: FloorLayer) -> Self
fn from(s: FloorLayer) -> Self
Converts to this type from the input type.
sourceimpl From<HardSigmoidLayer> for ActivationLayer
impl From<HardSigmoidLayer> for ActivationLayer
sourcefn from(s: HardSigmoidLayer) -> Self
fn from(s: HardSigmoidLayer) -> Self
Converts to this type from the input type.
sourceimpl From<HardSwishLayer> for ActivationLayer
impl From<HardSwishLayer> for ActivationLayer
sourcefn from(s: HardSwishLayer) -> Self
fn from(s: HardSwishLayer) -> Self
Converts to this type from the input type.
sourceimpl From<LogLayer> for ActivationLayer
impl From<LogLayer> for ActivationLayer
sourceimpl From<MishLayer> for ActivationLayer
impl From<MishLayer> for ActivationLayer
sourceimpl From<NotLayer> for ActivationLayer
impl From<NotLayer> for ActivationLayer
sourceimpl From<PowerLayer> for ActivationLayer
impl From<PowerLayer> for ActivationLayer
sourcefn from(s: PowerLayer) -> Self
fn from(s: PowerLayer) -> Self
Converts to this type from the input type.
sourceimpl From<ReLU6Layer> for ActivationLayer
impl From<ReLU6Layer> for ActivationLayer
sourcefn from(s: ReLU6Layer) -> Self
fn from(s: ReLU6Layer) -> Self
Converts to this type from the input type.
sourceimpl From<ReLULayer> for ActivationLayer
impl From<ReLULayer> for ActivationLayer
sourceimpl From<RoundLayer> for ActivationLayer
impl From<RoundLayer> for ActivationLayer
sourcefn from(s: RoundLayer) -> Self
fn from(s: RoundLayer) -> Self
Converts to this type from the input type.
sourceimpl From<SeluLayer> for ActivationLayer
impl From<SeluLayer> for ActivationLayer
sourceimpl From<SigmoidLayer> for ActivationLayer
impl From<SigmoidLayer> for ActivationLayer
sourcefn from(s: SigmoidLayer) -> Self
fn from(s: SigmoidLayer) -> Self
Converts to this type from the input type.
sourceimpl From<SinLayer> for ActivationLayer
impl From<SinLayer> for ActivationLayer
sourceimpl From<SinhLayer> for ActivationLayer
impl From<SinhLayer> for ActivationLayer
sourceimpl From<SoftplusLayer> for ActivationLayer
impl From<SoftplusLayer> for ActivationLayer
sourcefn from(s: SoftplusLayer) -> Self
fn from(s: SoftplusLayer) -> Self
Converts to this type from the input type.
sourceimpl From<SoftsignLayer> for ActivationLayer
impl From<SoftsignLayer> for ActivationLayer
sourcefn from(s: SoftsignLayer) -> Self
fn from(s: SoftsignLayer) -> Self
Converts to this type from the input type.
sourceimpl From<SqrtLayer> for ActivationLayer
impl From<SqrtLayer> for ActivationLayer
sourceimpl From<SwishLayer> for ActivationLayer
impl From<SwishLayer> for ActivationLayer
sourcefn from(s: SwishLayer) -> Self
fn from(s: SwishLayer) -> Self
Converts to this type from the input type.
sourceimpl From<TanHLayer> for ActivationLayer
impl From<TanHLayer> for ActivationLayer
sourceimpl From<TanLayer> for ActivationLayer
impl From<TanLayer> for ActivationLayer
sourceimpl From<ThresholdedReluLayer> for ActivationLayer
impl From<ThresholdedReluLayer> for ActivationLayer
sourcefn from(s: ThresholdedReluLayer) -> Self
fn from(s: ThresholdedReluLayer) -> Self
Converts to this type from the input type.
sourceimpl LayerTrait for ActivationLayer
impl LayerTrait for ActivationLayer
fn as_raw_mut_Layer(&mut self) -> *mut c_void
sourcefn set_blobs(&mut self, val: Vector<Mat>)
fn set_blobs(&mut self, val: Vector<Mat>)
List of learned parameters must be stored here to allow read them by using Net::getParam().
sourcefn set_name(&mut self, val: &str)
fn set_name(&mut self, val: &str)
Name of the layer instance, can be used for logging or other internal purposes.
sourcefn set_type(&mut self, val: &str)
fn set_type(&mut self, val: &str)
Type name which was used for creating layer by layer factory.
sourcefn set_preferable_target(&mut self, val: i32)
fn set_preferable_target(&mut self, val: i32)
prefer target for layer forwarding
sourcefn finalize(
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray
) -> Result<()>
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
sourcefn forward_mat(
&mut self,
input: &mut Vector<Mat>,
output: &mut Vector<Mat>,
internals: &mut Vector<Mat>
) -> Result<()>
fn forward_mat(
&mut self,
input: &mut Vector<Mat>,
output: &mut Vector<Mat>,
internals: &mut Vector<Mat>
) -> Result<()>
Use Layer::forward(InputArrayOfArrays, OutputArrayOfArrays, OutputArrayOfArrays) instead
Given the @p input blobs, computes the output @p blobs. Read more
sourcefn forward(
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
internals: &mut dyn ToOutputArray
) -> Result<()>
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
sourcefn try_quantize(
&mut self,
scales: &Vector<Vector<f32>>,
zeropoints: &Vector<Vector<i32>>,
params: &mut LayerParams
) -> Result<bool>
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
sourcefn forward_fallback(
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
internals: &mut dyn ToOutputArray
) -> Result<()>
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
sourcefn finalize_mat_to(
&mut self,
inputs: &Vector<Mat>,
outputs: &mut Vector<Mat>
) -> Result<()>
fn finalize_mat_to(
&mut self,
inputs: &Vector<Mat>,
outputs: &mut Vector<Mat>
) -> Result<()>
Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead
Computes and sets internal parameters according to inputs, outputs and blobs. Read more
sourcefn finalize_mat(&mut self, inputs: &Vector<Mat>) -> Result<Vector<Mat>>
fn finalize_mat(&mut self, inputs: &Vector<Mat>) -> Result<Vector<Mat>>
Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead
Computes and sets internal parameters according to inputs, outputs and blobs. Read more
sourcefn run(
&mut self,
inputs: &Vector<Mat>,
outputs: &mut Vector<Mat>,
internals: &mut Vector<Mat>
) -> Result<()>
fn run(
&mut self,
inputs: &Vector<Mat>,
outputs: &mut Vector<Mat>,
internals: &mut Vector<Mat>
) -> Result<()>
This method will be removed in the future release.
Allocates layer and computes output. Read more
sourcefn input_name_to_index(&mut self, input_name: &str) -> Result<i32>
fn input_name_to_index(&mut self, input_name: &str) -> Result<i32>
Returns index of input blob into the input array. Read more
sourcefn output_name_to_index(&mut self, output_name: &str) -> Result<i32>
fn output_name_to_index(&mut self, output_name: &str) -> Result<i32>
Returns index of output blob in output array. Read more
sourcefn support_backend(&mut self, backend_id: i32) -> Result<bool>
fn support_backend(&mut self, backend_id: i32) -> Result<bool>
Ask layer if it support specific backend for doing computations. Read more
sourcefn init_halide(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>
) -> Result<Ptr<BackendNode>>
fn init_halide(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>
) -> Result<Ptr<BackendNode>>
Returns Halide backend node. Read more
fn init_inf_engine(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>
) -> Result<Ptr<BackendNode>>
fn init_ngraph(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>,
nodes: &Vector<Ptr<BackendNode>>
) -> Result<Ptr<BackendNode>>
fn init_vk_com(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>
) -> Result<Ptr<BackendNode>>
fn init_webnn(
&mut self,
inputs: &Vector<Ptr<dyn BackendWrapper>>,
nodes: &Vector<Ptr<BackendNode>>
) -> Result<Ptr<BackendNode>>
sourceunsafe fn init_cuda(
&mut self,
context: *mut c_void,
inputs: &Vector<Ptr<dyn BackendWrapper>>,
outputs: &Vector<Ptr<dyn BackendWrapper>>
) -> Result<Ptr<BackendNode>>
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
sourcefn try_attach(&mut self, node: &Ptr<BackendNode>) -> Result<Ptr<BackendNode>>
fn try_attach(&mut self, node: &Ptr<BackendNode>) -> Result<Ptr<BackendNode>>
Implement layers fusing. Read more
sourcefn set_activation(&mut self, layer: &Ptr<ActivationLayer>) -> Result<bool>
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
sourcefn try_fuse(&mut self, top: &mut Ptr<Layer>) -> Result<bool>
fn try_fuse(&mut self, top: &mut Ptr<Layer>) -> Result<bool>
Try to fuse current layer with a next one Read more
sourcefn unset_attached(&mut self) -> Result<()>
fn unset_attached(&mut self) -> Result<()>
“Deattaches” all the layers, attached to particular layer.
fn update_memory_shapes(&mut self, inputs: &Vector<MatShape>) -> Result<bool>
fn set_params_from(&mut self, params: &LayerParams) -> Result<()>
sourceimpl LayerTraitConst for ActivationLayer
impl LayerTraitConst for ActivationLayer
fn as_raw_Layer(&self) -> *const c_void
sourcefn blobs(&self) -> Vector<Mat>
fn blobs(&self) -> Vector<Mat>
List of learned parameters must be stored here to allow read them by using Net::getParam().
sourcefn name(&self) -> String
fn name(&self) -> String
Name of the layer instance, can be used for logging or other internal purposes.
sourcefn preferable_target(&self) -> i32
fn preferable_target(&self) -> i32
prefer target for layer forwarding
sourcefn apply_halide_scheduler(
&self,
node: &mut Ptr<BackendNode>,
inputs: &Vector<Mat>,
outputs: &Vector<Mat>,
target_id: i32
) -> Result<()>
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
sourcefn get_scale_shift(&self, scale: &mut Mat, shift: &mut Mat) -> Result<()>
fn get_scale_shift(&self, scale: &mut Mat, shift: &mut Mat) -> Result<()>
Returns parameters of layers with channel-wise multiplication and addition. Read more
sourcefn get_scale_zeropoint(
&self,
scale: &mut f32,
zeropoint: &mut i32
) -> Result<()>
fn get_scale_zeropoint(
&self,
scale: &mut f32,
zeropoint: &mut i32
) -> Result<()>
Returns scale and zeropoint of layers Read more
fn get_memory_shapes(
&self,
inputs: &Vector<MatShape>,
required_outputs: i32,
outputs: &mut Vector<MatShape>,
internals: &mut Vector<MatShape>
) -> Result<bool>
fn get_flops(
&self,
inputs: &Vector<MatShape>,
outputs: &Vector<MatShape>
) -> Result<i64>
sourceimpl TryFrom<ActivationLayer> for AbsLayer
impl TryFrom<ActivationLayer> for AbsLayer
sourceimpl TryFrom<ActivationLayer> for AcosLayer
impl TryFrom<ActivationLayer> for AcosLayer
sourceimpl TryFrom<ActivationLayer> for CeilLayer
impl TryFrom<ActivationLayer> for CeilLayer
sourceimpl TryFrom<ActivationLayer> for CeluLayer
impl TryFrom<ActivationLayer> for CeluLayer
sourceimpl TryFrom<ActivationLayer> for ChannelsPReLULayer
impl TryFrom<ActivationLayer> for ChannelsPReLULayer
sourceimpl TryFrom<ActivationLayer> for CosLayer
impl TryFrom<ActivationLayer> for CosLayer
sourceimpl TryFrom<ActivationLayer> for CoshLayer
impl TryFrom<ActivationLayer> for CoshLayer
sourceimpl TryFrom<ActivationLayer> for ELULayer
impl TryFrom<ActivationLayer> for ELULayer
sourceimpl TryFrom<ActivationLayer> for ErfLayer
impl TryFrom<ActivationLayer> for ErfLayer
sourceimpl TryFrom<ActivationLayer> for ExpLayer
impl TryFrom<ActivationLayer> for ExpLayer
sourceimpl TryFrom<ActivationLayer> for FloorLayer
impl TryFrom<ActivationLayer> for FloorLayer
sourceimpl TryFrom<ActivationLayer> for HardSigmoidLayer
impl TryFrom<ActivationLayer> for HardSigmoidLayer
sourceimpl TryFrom<ActivationLayer> for AcoshLayer
impl TryFrom<ActivationLayer> for AcoshLayer
sourceimpl TryFrom<ActivationLayer> for HardSwishLayer
impl TryFrom<ActivationLayer> for HardSwishLayer
sourceimpl TryFrom<ActivationLayer> for LogLayer
impl TryFrom<ActivationLayer> for LogLayer
sourceimpl TryFrom<ActivationLayer> for MishLayer
impl TryFrom<ActivationLayer> for MishLayer
sourceimpl TryFrom<ActivationLayer> for NotLayer
impl TryFrom<ActivationLayer> for NotLayer
sourceimpl TryFrom<ActivationLayer> for PowerLayer
impl TryFrom<ActivationLayer> for PowerLayer
sourceimpl TryFrom<ActivationLayer> for ReLU6Layer
impl TryFrom<ActivationLayer> for ReLU6Layer
sourceimpl TryFrom<ActivationLayer> for ReLULayer
impl TryFrom<ActivationLayer> for ReLULayer
sourceimpl TryFrom<ActivationLayer> for RoundLayer
impl TryFrom<ActivationLayer> for RoundLayer
sourceimpl TryFrom<ActivationLayer> for SeluLayer
impl TryFrom<ActivationLayer> for SeluLayer
sourceimpl TryFrom<ActivationLayer> for SigmoidLayer
impl TryFrom<ActivationLayer> for SigmoidLayer
sourceimpl TryFrom<ActivationLayer> for ActivationLayerInt8
impl TryFrom<ActivationLayer> for ActivationLayerInt8
sourceimpl TryFrom<ActivationLayer> for SinLayer
impl TryFrom<ActivationLayer> for SinLayer
sourceimpl TryFrom<ActivationLayer> for SinhLayer
impl TryFrom<ActivationLayer> for SinhLayer
sourceimpl TryFrom<ActivationLayer> for SoftplusLayer
impl TryFrom<ActivationLayer> for SoftplusLayer
sourceimpl TryFrom<ActivationLayer> for SoftsignLayer
impl TryFrom<ActivationLayer> for SoftsignLayer
sourceimpl TryFrom<ActivationLayer> for SqrtLayer
impl TryFrom<ActivationLayer> for SqrtLayer
sourceimpl TryFrom<ActivationLayer> for SwishLayer
impl TryFrom<ActivationLayer> for SwishLayer
sourceimpl TryFrom<ActivationLayer> for TanHLayer
impl TryFrom<ActivationLayer> for TanHLayer
sourceimpl TryFrom<ActivationLayer> for TanLayer
impl TryFrom<ActivationLayer> for TanLayer
sourceimpl TryFrom<ActivationLayer> for ThresholdedReluLayer
impl TryFrom<ActivationLayer> for ThresholdedReluLayer
sourceimpl TryFrom<ActivationLayer> for AsinLayer
impl TryFrom<ActivationLayer> for AsinLayer
sourceimpl TryFrom<ActivationLayer> for AsinhLayer
impl TryFrom<ActivationLayer> for AsinhLayer
sourceimpl TryFrom<ActivationLayer> for AtanLayer
impl TryFrom<ActivationLayer> for AtanLayer
sourceimpl TryFrom<ActivationLayer> for AtanhLayer
impl TryFrom<ActivationLayer> for AtanhLayer
sourceimpl TryFrom<ActivationLayer> for BNLLLayer
impl TryFrom<ActivationLayer> for BNLLLayer
sourceimpl TryFrom<ActivationLayer> for BatchNormLayer
impl TryFrom<ActivationLayer> for BatchNormLayer
sourceimpl TryFrom<Layer> for ActivationLayer
impl TryFrom<Layer> for ActivationLayer
impl Send for ActivationLayer
Auto Trait Implementations
impl RefUnwindSafe for ActivationLayer
impl !Sync for ActivationLayer
impl Unpin for ActivationLayer
impl UnwindSafe for ActivationLayer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more