@@ -371,28 +371,28 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
371
371
/* * @brief Runs forward pass to compute output of layer with name @p outputName.
372
372
* @param outputName name for layer which output is needed to get
373
373
* @return blob for first output of specified layer.
374
- * @details By default runs forward pass for the whole network.
375
- */
374
+ * @details By default runs forward pass for the whole network.
375
+ */
376
376
CV_WRAP Mat forward (const String& outputName = String());
377
377
378
378
/* * @brief Runs forward pass to compute output of layer with name @p outputName.
379
379
* @param outputBlobs contains all output blobs for specified layer.
380
380
* @param outputName name for layer which output is needed to get
381
- * @details If @p outputName is empty, runs forward pass for the whole network.
382
- */
381
+ * @details If @p outputName is empty, runs forward pass for the whole network.
382
+ */
383
383
CV_WRAP void forward (std::vector<Mat>& outputBlobs, const String& outputName = String());
384
384
385
385
/* * @brief Runs forward pass to compute outputs of layers listed in @p outBlobNames.
386
386
* @param outputBlobs contains blobs for first outputs of specified layers.
387
387
* @param outBlobNames names for layers which outputs are needed to get
388
- */
388
+ */
389
389
CV_WRAP void forward (std::vector<Mat>& outputBlobs,
390
390
const std::vector<String>& outBlobNames);
391
391
392
392
/* * @brief Runs forward pass to compute outputs of layers listed in @p outBlobNames.
393
393
* @param outputBlobs contains all output blobs for each layer specified in @p outBlobNames.
394
394
* @param outBlobNames names for layers which outputs are needed to get
395
- */
395
+ */
396
396
CV_WRAP void forward (std::vector<std::vector<Mat> >& outputBlobs,
397
397
const std::vector<String>& outBlobNames);
398
398
@@ -460,103 +460,103 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
460
460
*/
461
461
CV_WRAP std::vector<int > getUnconnectedOutLayers () const ;
462
462
/* * @brief Returns input and output shapes for all layers in loaded model;
463
- * preliminary inferencing isn't necessary.
464
- * @param netInputShapes shapes for all input blobs in net input layer.
465
- * @param layersIds output parameter for layer IDs.
466
- * @param inLayersShapes output parameter for input layers shapes;
467
- * order is the same as in layersIds
468
- * @param outLayersShapes output parameter for output layers shapes;
469
- * order is the same as in layersIds
470
- */
471
- CV_WRAP void getLayersShapes (const std::vector<MatShape>& netInputShapes,
472
- std::vector<int >* layersIds,
473
- std::vector<std::vector<MatShape> >* inLayersShapes,
474
- std::vector<std::vector<MatShape> >* outLayersShapes) const ;
475
-
476
- /* * @overload */
477
- CV_WRAP void getLayersShapes (const MatShape& netInputShape,
478
- std::vector<int >* layersIds,
479
- std::vector<std::vector<MatShape> >* inLayersShapes,
480
- std::vector<std::vector<MatShape> >* outLayersShapes) const ;
481
-
482
- /* * @brief Returns input and output shapes for layer with specified
483
- * id in loaded model; preliminary inferencing isn't necessary.
484
- * @param netInputShape shape input blob in net input layer.
485
- * @param layerId id for layer.
486
- * @param inLayerShapes output parameter for input layers shapes;
487
- * order is the same as in layersIds
488
- * @param outLayerShapes output parameter for output layers shapes;
489
- * order is the same as in layersIds
490
- */
491
- CV_WRAP void getLayerShapes (const MatShape& netInputShape,
492
- const int layerId,
493
- std::vector<MatShape>* inLayerShapes,
494
- std::vector<MatShape>* outLayerShapes) const ;
463
+ * preliminary inferencing isn't necessary.
464
+ * @param netInputShapes shapes for all input blobs in net input layer.
465
+ * @param layersIds output parameter for layer IDs.
466
+ * @param inLayersShapes output parameter for input layers shapes;
467
+ * order is the same as in layersIds
468
+ * @param outLayersShapes output parameter for output layers shapes;
469
+ * order is the same as in layersIds
470
+ */
471
+ CV_WRAP void getLayersShapes (const std::vector<MatShape>& netInputShapes,
472
+ std::vector<int >* layersIds,
473
+ std::vector<std::vector<MatShape> >* inLayersShapes,
474
+ std::vector<std::vector<MatShape> >* outLayersShapes) const ;
475
+
476
+ /* * @overload */
477
+ CV_WRAP void getLayersShapes (const MatShape& netInputShape,
478
+ std::vector<int >* layersIds,
479
+ std::vector<std::vector<MatShape> >* inLayersShapes,
480
+ std::vector<std::vector<MatShape> >* outLayersShapes) const ;
481
+
482
+ /* * @brief Returns input and output shapes for layer with specified
483
+ * id in loaded model; preliminary inferencing isn't necessary.
484
+ * @param netInputShape shape input blob in net input layer.
485
+ * @param layerId id for layer.
486
+ * @param inLayerShapes output parameter for input layers shapes;
487
+ * order is the same as in layersIds
488
+ * @param outLayerShapes output parameter for output layers shapes;
489
+ * order is the same as in layersIds
490
+ */
491
+ CV_WRAP void getLayerShapes (const MatShape& netInputShape,
492
+ const int layerId,
493
+ std::vector<MatShape>* inLayerShapes,
494
+ std::vector<MatShape>* outLayerShapes) const ;
495
495
496
- /* * @overload */
497
- CV_WRAP void getLayerShapes (const std::vector<MatShape>& netInputShapes,
496
+ /* * @overload */
497
+ CV_WRAP void getLayerShapes (const std::vector<MatShape>& netInputShapes,
498
498
const int layerId,
499
499
std::vector<MatShape>* inLayerShapes,
500
500
std::vector<MatShape>* outLayerShapes) const ;
501
- /* * @brief Computes FLOP for whole loaded model with specified input shapes.
502
- * @param netInputShapes vector of shapes for all net inputs.
503
- * @returns computed FLOP.
504
- */
505
- CV_WRAP int64 getFLOPS (const std::vector<MatShape>& netInputShapes) const ;
506
- /* * @overload */
507
- CV_WRAP int64 getFLOPS (const MatShape& netInputShape) const ;
508
- /* * @overload */
509
- CV_WRAP int64 getFLOPS (const int layerId,
510
- const std::vector<MatShape>& netInputShapes) const ;
511
- /* * @overload */
512
- CV_WRAP int64 getFLOPS (const int layerId,
513
- const MatShape& netInputShape) const ;
514
-
515
- /* * @brief Returns list of types for layer used in model.
516
- * @param layersTypes output parameter for returning types.
517
- */
518
- CV_WRAP void getLayerTypes (CV_OUT std::vector<String>& layersTypes) const ;
519
-
520
- /* * @brief Returns count of layers of specified type.
521
- * @param layerType type.
522
- * @returns count of layers
523
- */
524
- CV_WRAP int getLayersCount (const String& layerType) const ;
525
-
526
- /* * @brief Computes bytes number which are requered to store
527
- * all weights and intermediate blobs for model.
528
- * @param netInputShapes vector of shapes for all net inputs.
529
- * @param weights output parameter to store resulting bytes for weights.
530
- * @param blobs output parameter to store resulting bytes for intermediate blobs.
531
- */
532
- CV_WRAP void getMemoryConsumption (const std::vector<MatShape>& netInputShapes,
533
- CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
534
- /* * @overload */
535
- CV_WRAP void getMemoryConsumption (const MatShape& netInputShape,
536
- CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
537
- /* * @overload */
538
- CV_WRAP void getMemoryConsumption (const int layerId,
539
- const std::vector<MatShape>& netInputShapes,
540
- CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
541
- /* * @overload */
542
- CV_WRAP void getMemoryConsumption (const int layerId,
543
- const MatShape& netInputShape,
544
- CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
545
-
546
- /* * @brief Computes bytes number which are requered to store
547
- * all weights and intermediate blobs for each layer.
548
- * @param netInputShapes vector of shapes for all net inputs.
549
- * @param layerIds output vector to save layer IDs.
550
- * @param weights output parameter to store resulting bytes for weights.
551
- * @param blobs output parameter to store resulting bytes for intermediate blobs.
552
- */
553
- CV_WRAP void getMemoryConsumption (const std::vector<MatShape>& netInputShapes,
554
- CV_OUT std::vector<int >& layerIds, CV_OUT std::vector<size_t >& weights,
555
- CV_OUT std::vector<size_t >& blobs) const ;
556
- /* * @overload */
557
- CV_WRAP void getMemoryConsumption (const MatShape& netInputShape,
558
- CV_OUT std::vector<int >& layerIds, CV_OUT std::vector<size_t >& weights,
559
- CV_OUT std::vector<size_t >& blobs) const ;
501
+ /* * @brief Computes FLOP for whole loaded model with specified input shapes.
502
+ * @param netInputShapes vector of shapes for all net inputs.
503
+ * @returns computed FLOP.
504
+ */
505
+ CV_WRAP int64 getFLOPS (const std::vector<MatShape>& netInputShapes) const ;
506
+ /* * @overload */
507
+ CV_WRAP int64 getFLOPS (const MatShape& netInputShape) const ;
508
+ /* * @overload */
509
+ CV_WRAP int64 getFLOPS (const int layerId,
510
+ const std::vector<MatShape>& netInputShapes) const ;
511
+ /* * @overload */
512
+ CV_WRAP int64 getFLOPS (const int layerId,
513
+ const MatShape& netInputShape) const ;
514
+
515
+ /* * @brief Returns list of types for layer used in model.
516
+ * @param layersTypes output parameter for returning types.
517
+ */
518
+ CV_WRAP void getLayerTypes (CV_OUT std::vector<String>& layersTypes) const ;
519
+
520
+ /* * @brief Returns count of layers of specified type.
521
+ * @param layerType type.
522
+ * @returns count of layers
523
+ */
524
+ CV_WRAP int getLayersCount (const String& layerType) const ;
525
+
526
+ /* * @brief Computes bytes number which are requered to store
527
+ * all weights and intermediate blobs for model.
528
+ * @param netInputShapes vector of shapes for all net inputs.
529
+ * @param weights output parameter to store resulting bytes for weights.
530
+ * @param blobs output parameter to store resulting bytes for intermediate blobs.
531
+ */
532
+ CV_WRAP void getMemoryConsumption (const std::vector<MatShape>& netInputShapes,
533
+ CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
534
+ /* * @overload */
535
+ CV_WRAP void getMemoryConsumption (const MatShape& netInputShape,
536
+ CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
537
+ /* * @overload */
538
+ CV_WRAP void getMemoryConsumption (const int layerId,
539
+ const std::vector<MatShape>& netInputShapes,
540
+ CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
541
+ /* * @overload */
542
+ CV_WRAP void getMemoryConsumption (const int layerId,
543
+ const MatShape& netInputShape,
544
+ CV_OUT size_t & weights, CV_OUT size_t & blobs) const ;
545
+
546
+ /* * @brief Computes bytes number which are requered to store
547
+ * all weights and intermediate blobs for each layer.
548
+ * @param netInputShapes vector of shapes for all net inputs.
549
+ * @param layerIds output vector to save layer IDs.
550
+ * @param weights output parameter to store resulting bytes for weights.
551
+ * @param blobs output parameter to store resulting bytes for intermediate blobs.
552
+ */
553
+ CV_WRAP void getMemoryConsumption (const std::vector<MatShape>& netInputShapes,
554
+ CV_OUT std::vector<int >& layerIds, CV_OUT std::vector<size_t >& weights,
555
+ CV_OUT std::vector<size_t >& blobs) const ;
556
+ /* * @overload */
557
+ CV_WRAP void getMemoryConsumption (const MatShape& netInputShape,
558
+ CV_OUT std::vector<int >& layerIds, CV_OUT std::vector<size_t >& weights,
559
+ CV_OUT std::vector<size_t >& blobs) const ;
560
560
private:
561
561
562
562
struct Impl ;
0 commit comments