[−][src]Struct opencv::dnn::Layer
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 @ref dnnLayerFactory "LayerFactory" macros.
Methods
impl Layer
[src]
pub fn as_raw_Layer(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[src]
impl Layer
[src]
pub fn default() -> Result<Layer>
[src]
pub fn new(params: &LayerParams) -> Result<Layer>
[src]
Initializes only #name, #type and #blobs fields.
Trait Implementations
impl AlgorithmTrait for Layer
[src]
fn as_raw_Algorithm(&self) -> *mut c_void
[src]
fn clear(&mut self) -> Result<()>
[src]
fn write(&self, fs: &mut FileStorage) -> Result<()>
[src]
fn write_1(&self, fs: &PtrOfFileStorage, name: &str) -> Result<()>
[src]
fn read(&mut self, _fn: &FileNode) -> Result<()>
[src]
fn empty(&self) -> Result<bool>
[src]
fn save(&self, filename: &str) -> Result<()>
[src]
fn get_default_name(&self) -> Result<String>
[src]
impl LayerTrait for Layer
[src]
fn as_raw_Layer(&self) -> *mut c_void
[src]
fn blobs(&mut self) -> Result<VectorOfMat>
[src]
fn set_blobs(&mut self, val: VectorOfMat) -> Result<()>
[src]
fn name(&mut self) -> Result<String>
[src]
fn set_name(&mut self, val: &str) -> Result<()>
[src]
fn _type(&mut self) -> Result<String>
[src]
fn set_type(&mut self, val: &str) -> Result<()>
[src]
fn preferable_target(&self) -> Result<i32>
[src]
fn finalize(
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray
) -> Result<()>
fn forward(
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
internals: &mut dyn ToOutputArray
) -> Result<()>
[src]
&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<()>
[src]
&mut self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
internals: &mut dyn ToOutputArray
) -> Result<()>
fn finalize_mat(&mut self, inputs: &VectorOfMat) -> Result<VectorOfMat>
[src]
fn run(
&mut self,
inputs: &VectorOfMat,
outputs: &mut VectorOfMat,
internals: &mut VectorOfMat
) -> Result<()>
[src]
&mut self,
inputs: &VectorOfMat,
outputs: &mut VectorOfMat,
internals: &mut VectorOfMat
) -> Result<()>
fn input_name_to_index(&mut self, input_name: &str) -> Result<i32>
[src]
fn output_name_to_index(&mut self, output_name: &str) -> Result<i32>
[src]
fn support_backend(&mut self, backend_id: i32) -> Result<bool>
[src]
fn init_halide(
&mut self,
inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
[src]
&mut self,
inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
fn init_inf_engine(
&mut self,
inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
[src]
&mut self,
inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
fn try_attach(&mut self, node: &PtrOfBackendNode) -> Result<PtrOfBackendNode>
[src]
fn set_activation(&mut self, layer: &PtrOfActivationLayer) -> Result<bool>
[src]
fn try_fuse(&mut self, top: &mut PtrOfLayer) -> Result<bool>
[src]
fn get_scale_shift(&self, scale: &mut Mat, shift: &mut Mat) -> Result<()>
[src]
fn unset_attached(&mut self) -> Result<()>
[src]
fn get_memory_shapes(
&self,
inputs: &VectorOfVectorOfint,
required_outputs: i32,
outputs: &mut VectorOfVectorOfint,
internals: &mut VectorOfVectorOfint
) -> Result<bool>
[src]
&self,
inputs: &VectorOfVectorOfint,
required_outputs: i32,
outputs: &mut VectorOfVectorOfint,
internals: &mut VectorOfVectorOfint
) -> Result<bool>
fn get_flops(
&self,
inputs: &VectorOfVectorOfint,
outputs: &VectorOfVectorOfint
) -> Result<i64>
[src]
&self,
inputs: &VectorOfVectorOfint,
outputs: &VectorOfVectorOfint
) -> Result<i64>
fn set_params_from(&mut self, params: &LayerParams) -> Result<()>
[src]
impl Send for Layer
[src]
impl Drop for Layer
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,