[FFmpeg-devel] [PATCH 3/5 v2] lavfi/dnn_backend_native_layer_dense.h: Documentation

Guo, Yejun yejun.guo at intel.com
Thu May 13 04:21:55 EEST 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Shubhanshu Saxena
> Sent: 2021年5月13日 2:45
> To: ffmpeg-devel at ffmpeg.org
> Cc: Shubhanshu Saxena <shubhanshu.e01 at gmail.com>
> Subject: [FFmpeg-devel] [PATCH 3/5 v2]
> lavfi/dnn_backend_native_layer_dense.h: Documentation
> 
> Add documentation for Dense Layer
> 
> Signed-off-by: Shubhanshu Saxena <shubhanshu.e01 at gmail.com>
> ---
>  .../dnn/dnn_backend_native_layer_dense.h      | 28
> +++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/libavfilter/dnn/dnn_backend_native_layer_dense.h
> b/libavfilter/dnn/dnn_backend_native_layer_dense.h
> index 86248856ae..83fcb18831 100644
> --- a/libavfilter/dnn/dnn_backend_native_layer_dense.h
> +++ b/libavfilter/dnn/dnn_backend_native_layer_dense.h
> @@ -31,7 +31,35 @@ typedef struct DenseParams{
>      float *biases;
>  } DenseParams;
> 
> +/**
> + * @brief Load the Densely-Connnected Layer.

Connnected -> Connected

> + *
> + * It assigns the layer parameters to the hyperparameters
> + * like activation, bias, and kernel size after parsing
> + * from the model file context.

dense layer does not has parameter kernel size, it is derived
from layer's input number and output number.

it is a time consuming work to list all the correct parameters here,
so we might simplify the doc like below for all the patches.

It assigns the densely-connected layer with DenseParams
after parsing from the model file context.

> + *
> + * @param layer pointer to the DNN layer instance
> + * @param model_file_context pointer to model file context
> + * @param file_size model file size to check if data is read
> + * correctly from the model file
> + * @param operands_num operand count of the whole model to
> + * check if data is read correctly from the model file
> + * @return number of bytes read from the model file
> + * @retval 0 if out of memory or an error occurs
> + */
>  int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context,
> int file_size, int operands_num);
> +
> +/**
> + * @brief Execute the Densely-Connnected Layer.

typo: Connnected




More information about the ffmpeg-devel mailing list