[][src]Struct opencv::types::PtrOfRNNLayer

pub struct PtrOfRNNLayer { /* fields omitted */ }

Methods

impl PtrOfRNNLayer[src]

pub fn as_raw_PtrOfRNNLayer(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

Trait Implementations

impl Algorithm for PtrOfRNNLayer[src]

fn clear(&mut self) -> Result<()>[src]

Clears the algorithm state

fn empty(&self) -> Result<bool>[src]

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

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

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

fn get_default_name(&self) -> Result<String>[src]

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

impl Layer for PtrOfRNNLayer[src]

fn blobs(&mut self) -> Result<VectorOfMat>[src]

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

fn set_blobs(&mut self, val: VectorOfMat) -> Result<()>[src]

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

fn name(&mut self) -> Result<String>[src]

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

fn set_name(&mut self, val: &str) -> Result<()>[src]

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

fn _type(&mut self) -> Result<String>[src]

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

fn set_type(&mut self, val: &str) -> Result<()>[src]

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

fn preferable_target(&self) -> Result<i32>[src]

prefer target for layer forwarding

fn finalize_to(
    &mut self,
    inputs: &VectorOfMat,
    outputs: &mut VectorOfMat
) -> Result<()>
[src]

Computes and sets internal parameters according to inputs, outputs and blobs. ## Parameters * inputs: vector of already allocated input blobs * outputs: [out] vector of already allocated output blobs Read more

fn forward(
    &mut self,
    inputs: &VectorOfMat,
    outputs: &mut VectorOfMat,
    internals: &mut VectorOfMat
) -> Result<()>
[src]

Given the @p input blobs, computes the output @p blobs. ## Parameters * inputs: the input blobs. * outputs: [out] allocated output blobs, which will store results of the computation. * internals: [out] allocated internal blobs Read more

fn forward_fallback(
    &mut self,
    inputs: &VectorOfMat,
    outputs: &mut VectorOfMat,
    internals: &mut VectorOfMat
) -> Result<()>
[src]

Given the @p input blobs, computes the output @p blobs. ## Parameters * inputs: the input blobs. * outputs: [out] allocated output blobs, which will store results of the computation. * internals: [out] allocated internal blobs Read more

fn finalize(&mut self, inputs: &VectorOfMat) -> Result<VectorOfMat>[src]

Deprecated:

Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead

Deprecated: Use Layer::finalize(InputArrayOfArrays, OutputArrayOfArrays) instead

fn run(
    &mut self,
    inputs: &VectorOfMat,
    outputs: &mut VectorOfMat,
    internals: &mut VectorOfMat
) -> Result<()>
[src]

Deprecated:

This method will be removed in the future release.

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

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

Returns index of input blob into the input array. ## Parameters * inputName: label of input blob Read more

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

Returns index of output blob in output array. @see inputNameToIndex() Read more

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

Ask layer if it support specific backend for doing computations. ## Parameters * backendId: computation backend identifier. @see Backend Read more

fn init_halide(
    &mut self,
    inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
[src]

Returns Halide backend node. ## Parameters * inputs: Input Halide buffers. @see BackendNode, BackendWrapper Read more

fn init_inf_engine(
    &mut self,
    inputs: &VectorOfPtrOfBackendWrapper
) -> Result<PtrOfBackendNode>
[src]

fn try_attach(&mut self, node: &PtrOfBackendNode) -> Result<PtrOfBackendNode>[src]

Implement layers fusing. ## Parameters * node: Backend node of bottom layer. @see BackendNode Read more

fn set_activation(&mut self, layer: &PtrOfActivationLayer) -> Result<bool>[src]

Tries to attach to the layer the subsequent activation layer, i.e. do the layer fusion in a partial case. ## Parameters * layer: The subsequent activation layer. Read more

fn get_scale_shift(&self, scale: &mut Mat, shift: &mut Mat) -> Result<()>[src]

Returns parameters of layers with channel-wise multiplication and addition. ## Parameters * scale: [out] Channel-wise multipliers. Total number of values should be equal to number of channels. * shift: [out] Channel-wise offsets. Total number of values should be equal to number of channels. Read more

fn unset_attached(&mut self) -> Result<()>[src]

"Deattaches" all the layers, attached to particular layer.

fn get_memory_shapes(
    &self,
    inputs: &VectorOfVectorOfint,
    required_outputs: i32,
    outputs: &mut VectorOfVectorOfint,
    internals: &mut VectorOfVectorOfint
) -> Result<bool>
[src]

fn get_flops(
    &self,
    inputs: &VectorOfVectorOfint,
    outputs: &VectorOfVectorOfint
) -> Result<i64>
[src]

fn set_params_from(&mut self, params: &LayerParams) -> Result<()>[src]

Initializes only #name, #type and #blobs fields.

impl RNNLayer for PtrOfRNNLayer[src]

fn set_weights(
    &mut self,
    wxh: &Mat,
    bh: &Mat,
    whh: &Mat,
    who: &Mat,
    bo: &Mat
) -> Result<()>
[src]

Setups learned weights. Read more

fn set_produce_hidden_output(&mut self, produce: bool) -> Result<()>[src]

If this flag is set to true then layer will produce @f$ h_t @f$ as second output. @details Shape of the second output is the same as first output. Read more

impl Send for PtrOfRNNLayer[src]

impl Drop for PtrOfRNNLayer[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]