-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lavfi: Add Documentation to Native Backend Layers #396
Conversation
|
@Semmer2 please help to review the doc, thanks |
|
* like strides, padding method, and kernel size after | ||
* parsing from the model file context. | ||
* | ||
* Possible values for the padding method are SAME and VALID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe no need to specify the value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the padding method should be correctly selected to load the layer. But yes, since it is parsed from the model file context, maybe we don't need to specify its value. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we specify the values for the padding method in the typedef for the layer parameters?
@guoyejun, do you mean a check like this? if (avgpool_params->padding_method != SAME || avgpool_params->padding_method != VALID) {
av_freep(&avgpool_params);
return 0;
}
Shall I change the return value from 0 to |
@Semmer2 I noticed there is another padding method |
yes
Just leave it now. Sure, the final plan is to replace 'DNNReturnType' with 'int', while adding DNN_GENERIC_ERROR (or DNN_ERROR is a better naming?) in dnn_interface.h for errors general to dnn module. #define DNN_GENERIC_ERROR FFERRTAG('D','N','N','!') |
As far as I could understand, this is what I need to do -
Is the third step above correct? What does the |
right, just in case that an error does not belong to others |
Okay, thank you. And in typedef struct DnnLayerMathBinaryParams{
DNNMathBinaryOperation bin_op; // binary operator to be used
int input0_broadcast;
int input1_broadcast;
float v;
} DnnLayerMathBinaryParams; I could understand the |
@shubhanshu02 most of the code have been pushed into upstream, you may pending this (it's no problem to continue if you have bandwidth) and start the code for GSoC.
|
Sir, I have already done the required work for the error codes in #400. Currently, it is showing a merge conflict. I'll resolve and push it in a few minutes. Okay, I'll start this work today. So shall I extract only the common typedefs first? |
take your time, there's plenty of time available. typedef is just an example, you may think about it in a whole. |
Okay, got it. Thank you. |
btw, to save your time, you can just run to get all the patches with v4, and send them to community. |
Add documentation for Average Pool Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
@guoyejun thank you. That helped a lot. I was actually sending one by one by editing the subject before this. |
Add documentation for 2D Convolution Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Add documentation for Dense Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Add documentation for Depth to Space Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Add documentation for Unary Math Layer Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Description
Add documentation for the Average Pooling Layer.
Questions
@guoyejun, I have a few questions regarding the Average Pooling Layer.
dnn_size
returned byff_dnn_load_layer_avg_pool
the size of the layer or the size of parameters?SAME
orVALID
, but this isn't checking until the execution starts. Should we have an exclusive check for this while loading the layer?ff_dnn_execute_layer_avg_pool
, if the execution is successful, the function returns0
. But when it fails, it returnsDNN_ERROR
. I think it would be better to returnDNN_SUCCESS
though technically both are the same.