Message ID | 20210512184439.30591-3-shubhanshu.e01@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [FFmpeg-devel,1/5,v2] lavfi/dnn_backend_native_layer_avgpool.h: Documentation | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > Shubhanshu Saxena > Sent: 2021年5月13日 2:45 > To: ffmpeg-devel@ffmpeg.org > Cc: Shubhanshu Saxena <shubhanshu.e01@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@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
On Thu, May 13, 2021 at 6:52 AM Guo, Yejun <yejun.guo@intel.com> wrote: > > > > -----Original Message----- > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > > Shubhanshu Saxena > > Sent: 2021年5月13日 2:45 > > To: ffmpeg-devel@ffmpeg.org > > Cc: Shubhanshu Saxena <shubhanshu.e01@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@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 > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Sure, done. Thanks
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. + * + * It assigns the layer parameters to the hyperparameters + * like activation, bias, and kernel size 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. + * + * @param operands all operands for the model + * @param input_operand_indexes input operand indexes for this layer + * @param output_operand_index output operand index for this layer + * @param parameters average pooling parameters + * @param ctx pointer to Native model context for logging + * @retval 0 if the execution succeeds + * @retval DNN_ERROR if the execution fails + */ int ff_dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes, int32_t output_operand_index, const void *parameters, NativeContext *ctx); #endif
Add documentation for Dense Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com> --- .../dnn/dnn_backend_native_layer_dense.h | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)