FFmpeg
|
#include "dnn_backend_tf.h"
#include "dnn_backend_native.h"
#include "libavformat/avio.h"
#include "libavutil/avassert.h"
#include <tensorflow/c/c_api.h>
Go to the source code of this file.
Data Structures | |
struct | TFModel |
Macros | |
#define | NAME_BUFFER_SIZE 256 |
#define | CLEANUP_ON_ERROR(tf_model) |
Functions | |
static void | free_buffer (void *data, size_t length) |
static TF_Buffer * | read_graph (const char *model_filename) |
static TF_Tensor * | allocate_input_tensor (const DNNInputData *input) |
static DNNReturnType | set_input_output_tf (void *model, DNNInputData *input, const char *input_name, const char **output_names, uint32_t nb_output) |
static DNNReturnType | load_tf_model (TFModel *tf_model, const char *model_filename) |
static DNNReturnType | add_conv_layer (TFModel *tf_model, TF_Operation *transpose_op, TF_Operation **cur_op, ConvolutionalParams *params, const int layer) |
static DNNReturnType | add_depth_to_space_layer (TFModel *tf_model, TF_Operation **cur_op, DepthToSpaceParams *params, const int layer) |
static int | calculate_pad (const ConvolutionalNetwork *conv_network) |
static DNNReturnType | add_pad_op (TFModel *tf_model, TF_Operation **cur_op, const int32_t pad) |
static DNNReturnType | load_native_model (TFModel *tf_model, const char *model_filename) |
DNNModel * | ff_dnn_load_model_tf (const char *model_filename) |
DNNReturnType | ff_dnn_execute_model_tf (const DNNModel *model, DNNData *outputs, uint32_t nb_output) |
void | ff_dnn_free_model_tf (DNNModel **model) |
DNN tensorflow backend implementation.
Definition in file dnn_backend_tf.c.
#define NAME_BUFFER_SIZE 256 |
Definition at line 211 of file dnn_backend_tf.c.
#define CLEANUP_ON_ERROR | ( | tf_model | ) |
|
static |
Definition at line 44 of file dnn_backend_tf.c.
Referenced by read_graph().
|
static |
Definition at line 49 of file dnn_backend_tf.c.
Referenced by load_tf_model().
|
static |
Definition at line 82 of file dnn_backend_tf.c.
Referenced by set_input_output_tf().
|
static |
Definition at line 104 of file dnn_backend_tf.c.
Referenced by ff_dnn_load_model_tf().
|
static |
Definition at line 187 of file dnn_backend_tf.c.
Referenced by ff_dnn_load_model_tf().
|
static |
Definition at line 213 of file dnn_backend_tf.c.
Referenced by load_native_model().
|
static |
Definition at line 328 of file dnn_backend_tf.c.
Referenced by load_native_model().
|
static |
Definition at line 350 of file dnn_backend_tf.c.
Referenced by load_native_model().
|
static |
Definition at line 366 of file dnn_backend_tf.c.
Referenced by load_native_model().
|
static |
Definition at line 410 of file dnn_backend_tf.c.
Referenced by ff_dnn_load_model_tf().
DNNModel* ff_dnn_load_model_tf | ( | const char * | model_filename | ) |
Definition at line 504 of file dnn_backend_tf.c.
Referenced by ff_get_dnn_module().
DNNReturnType ff_dnn_execute_model_tf | ( | const DNNModel * | model, |
DNNData * | outputs, | ||
uint32_t | nb_output | ||
) |
Definition at line 537 of file dnn_backend_tf.c.
Referenced by ff_get_dnn_module().
void ff_dnn_free_model_tf | ( | DNNModel ** | model | ) |
Definition at line 571 of file dnn_backend_tf.c.
Referenced by ff_get_dnn_module().