[FFmpeg-devel,V2,1/7] libavfilter/dnn_backend_tf.c: set layer_add_res for input layer

Submitted by Guo, Yejun on April 25, 2019, 2:13 a.m.

Details

Message ID 1556158429-15012-1-git-send-email-yejun.guo@intel.com
State New
Headers show

Commit Message

Guo, Yejun April 25, 2019, 2:13 a.m.
otherwise, the following check will return error if layer_add_res
is randomly initialized.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
---
 libavfilter/dnn_backend_tf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pedro Arthur April 29, 2019, 5:35 p.m.
Em qua, 24 de abr de 2019 às 23:14, Guo, Yejun <yejun.guo@intel.com> escreveu:
>
> otherwise, the following check will return error if layer_add_res
> is randomly initialized.
>
> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
> ---
>  libavfilter/dnn_backend_tf.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c
> index 5bc7f06..9e0c127 100644
> --- a/libavfilter/dnn_backend_tf.c
> +++ b/libavfilter/dnn_backend_tf.c
> @@ -440,6 +440,7 @@ static DNNReturnType load_native_model(TFModel *tf_model, const char *model_file
>      for (layer = 0; layer < conv_network->layers_num; ++layer){
>          switch (conv_network->layers[layer].type){
>          case INPUT:
> +            layer_add_res = DNN_SUCCESS;
>              break;
>          case CONV:
>              layer_add_res = add_conv_layer(tf_model, transpose_op, &op,
> --
> 2.7.4

LGTM.

>
> _______________________________________________
> 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".

Patch hide | download patch | download mbox

diff --git a/libavfilter/dnn_backend_tf.c b/libavfilter/dnn_backend_tf.c
index 5bc7f06..9e0c127 100644
--- a/libavfilter/dnn_backend_tf.c
+++ b/libavfilter/dnn_backend_tf.c
@@ -440,6 +440,7 @@  static DNNReturnType load_native_model(TFModel *tf_model, const char *model_file
     for (layer = 0; layer < conv_network->layers_num; ++layer){
         switch (conv_network->layers[layer].type){
         case INPUT:
+            layer_add_res = DNN_SUCCESS;
             break;
         case CONV:
             layer_add_res = add_conv_layer(tf_model, transpose_op, &op,