diff options
author | Guo, Yejun <yejun.guo@intel.com> | 2020-08-13 16:19:48 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-08-25 09:02:59 +0800 |
commit | 0f7a99e37ae52f9ecdc4c81195c14b03f5be3dfd (patch) | |
tree | 00b5828f4f284ec9e363708ed89d4b2294e62a52 /libavfilter/dnn_interface.h | |
parent | b61376bdee61c08732105fa331eb076497eface9 (diff) |
dnn: move output name from DNNModel.set_input_output to DNNModule.execute_model
currently, output is set both at DNNModel.set_input_output and
DNNModule.execute_model, it makes sense that the output name is
provided at model inference time so all the output info is set
at a single place.
and so DNNModel.set_input_output is renamed to DNNModel.set_input
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/dnn_interface.h')
-rw-r--r-- | libavfilter/dnn_interface.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/dnn_interface.h b/libavfilter/dnn_interface.h index c5a72b4e52..365c9a4729 100644 --- a/libavfilter/dnn_interface.h +++ b/libavfilter/dnn_interface.h @@ -50,7 +50,7 @@ typedef struct DNNModel{ DNNReturnType (*get_input)(void *model, DNNData *input, const char *input_name); // Sets model input and output. // Should be called at least once before model execution. - DNNReturnType (*set_input_output)(void *model, DNNData *input, const char *input_name, const char **output_names, uint32_t nb_output); + DNNReturnType (*set_input)(void *model, DNNData *input, const char *input_name); } DNNModel; // Stores pointers to functions for loading, executing, freeing DNN models for one of the backends. @@ -58,7 +58,7 @@ typedef struct DNNModule{ // Loads model and parameters from given file. Returns NULL if it is not possible. DNNModel *(*load_model)(const char *model_filename, const char *options); // Executes model with specified input and output. Returns DNN_ERROR otherwise. - DNNReturnType (*execute_model)(const DNNModel *model, DNNData *outputs, uint32_t nb_output); + DNNReturnType (*execute_model)(const DNNModel *model, DNNData *outputs, const char **output_names, uint32_t nb_output); // Frees memory allocated for model. void (*free_model)(DNNModel **model); } DNNModule; |