Struct opencv::dnn::Net [−][src]
pub struct Net { /* fields omitted */ }
Expand description
This class allows to create and manipulate comprehensive artificial neural networks.
Neural network is presented as directed acyclic graph (DAG), where vertices are Layer instances, and edges specify relationships between layers inputs and outputs.
Each network layer has unique integer id and unique string name inside its network. LayerId can store either layer name or layer id.
This class supports reference counting of its instances, i. e. copies point to the same instance.
Implementations
Create a network from Intel’s Model Optimizer intermediate representation (IR).
Parameters
- xml: XML configuration file with network’s topology.
- bin: Binary file with trained weights. Networks imported from Intel’s Model Optimizer are launched in Intel’s Inference Engine backend.
Create a network from Intel’s Model Optimizer in-memory buffers with intermediate representation (IR).
Parameters
- bufferModelConfig: buffer with model’s configuration.
- bufferWeights: buffer with model’s trained weights.
Returns
Net object.
Create a network from Intel’s Model Optimizer in-memory buffers with intermediate representation (IR).
Parameters
- bufferModelConfigPtr: buffer pointer of model’s configuration.
- bufferModelConfigSize: buffer size of model’s configuration.
- bufferWeightsPtr: buffer pointer of model’s trained weights.
- bufferWeightsSize: buffer size of model’s trained weights.
Returns
Net object.
Trait Implementations
Dump net structure, hyperparameters, backend, target and fusion to dot file Read more
fn add_layer_type(
&mut self,
name: &str,
typ: &str,
dtype: &i32,
params: &mut LayerParams
) -> Result<i32>
fn add_layer_type(
&mut self,
name: &str,
typ: &str,
dtype: &i32,
params: &mut LayerParams
) -> Result<i32>
Adds new layer to the net. Read more
Adds new layer to the net. Read more
fn add_layer_to_prev_type(
&mut self,
name: &str,
typ: &str,
dtype: &i32,
params: &mut LayerParams
) -> Result<i32>
fn add_layer_to_prev_type(
&mut self,
name: &str,
typ: &str,
dtype: &i32,
params: &mut LayerParams
) -> Result<i32>
Adds new layer and connects its first input to the first output of previously added layer. Read more
fn add_layer_to_prev(
&mut self,
name: &str,
typ: &str,
params: &mut LayerParams
) -> Result<i32>
fn add_layer_to_prev(
&mut self,
name: &str,
typ: &str,
params: &mut LayerParams
) -> Result<i32>
Adds new layer and connects its first input to the first output of previously added layer. Read more
Converts string name of the layer to the integer identifier. Read more
Returns pointer to layer with specified id or name which the network use.
Returns pointers to input layers of specific layer.
Connects output of the first layer to input of the second layer. Read more
Connects #@p outNum output of the first layer to #@p inNum input of the second layer. Read more
Sets outputs names of the network input pseudo layer. Read more
Specify shape of network input.
Runs forward pass to compute output of layer with name @p outputName. Read more
Runs forward pass to compute output of layer with name @p outputName. Read more
fn forward_layer(
&mut self,
output_blobs: &mut dyn ToOutputArray,
output_name: &str
) -> Result<()>
fn forward_layer(
&mut self,
output_blobs: &mut dyn ToOutputArray,
output_name: &str
) -> Result<()>
Runs forward pass to compute output of layer with name @p outputName. Read more
Runs forward pass to compute outputs of layers listed in @p outBlobNames. Read more
Runs forward pass to compute outputs of layers listed in @p outBlobNames. Read more
Returns a quantized Net from a floating-point Net. Read more
Compile Halide layers. Read more
Ask network to use specific computation backend where it supported. Read more
Ask network to make computations on specific target device. Read more
Sets the new input value for the network Read more
Sets the new value for the learned param of the layer. Read more
Returns parameter blob of the layer. Read more
Enables or disables layer fusion in the network. Read more
Returns input scale and zeropoint for a quantized Net. Read more
Returns output scale and zeropoint for a quantized Net. Read more
Returns indexes of layers with unconnected outputs.
Returns names of layers with unconnected outputs.
Returns input and output shapes for all layers in loaded model; preliminary inferencing isn’t necessary. Read more
Returns input and output shapes for all layers in loaded model; preliminary inferencing isn’t necessary. Read more
Returns input and output shapes for layer with specified id in loaded model; preliminary inferencing isn’t necessary. Read more
Returns input and output shapes for layer with specified id in loaded model; preliminary inferencing isn’t necessary. Read more
Computes FLOP for whole loaded model with specified input shapes. Read more
Computes FLOP for whole loaded model with specified input shapes. Read more
Computes FLOP for whole loaded model with specified input shapes. Read more
Computes FLOP for whole loaded model with specified input shapes. Read more
Returns list of types for layer used in model. Read more
Returns count of layers of specified type. Read more
Computes bytes number which are required to store all weights and intermediate blobs for model. Read more
Computes bytes number which are required to store all weights and intermediate blobs for each layer. Read more
Computes bytes number which are required to store all weights and intermediate blobs for each layer. Read more
Computes bytes number which are required to store all weights and intermediate blobs for each layer. Read more
Computes bytes number which are required to store all weights and intermediate blobs for each layer. Read more