Functions | |
static void | DeallocateBuffer (void *data, size_t) |
static TF_Buffer * | ReadBufferFromFile (const char *file) |
TF_Graph * | LoadGraph (const char *graphPath) |
void | DeleteSession (TF_Session *session) |
TF_Tensor * | CreateTensor (TF_DataType data_type, const std::int64_t *dims, std::size_t num_dims, const void *data, std::size_t len) |
void | DeleteTensor (TF_Tensor *tensor) |
void | DeleteGraph (TF_Graph *graph) |
TF_Session * | CreateSession (TF_Graph *graph) |
TF_Code | RunSession (TF_Session *session, const TF_Output *inputs, TF_Tensor *const *input_tensors, std::size_t ninputs, const TF_Output *outputs, TF_Tensor **output_tensors, std::size_t noutputs) |
TF_Code | RunSession (TF_Session *session, const std::vector< TF_Output > &inputs, const std::vector< TF_Tensor * > &input_tensors, const std::vector< TF_Output > &outputs, std::vector< TF_Tensor * > &output_tensors) |
template<typename T > | |
TF_Tensor * | CreateTensor (TF_DataType data_type, const std::vector< std::int64_t > &dims, const std::vector< T > &data) |
TF_Tensor * | CreateEmptyTensor (TF_DataType data_type, const std::int64_t *dims, std::size_t num_dims) |
TF_Tensor * | CreateEmptyTensor (TF_DataType data_type, const std::vector< std::int64_t > &dims) |
void | DeleteTensors (const std::vector< TF_Tensor * > &tensors) |
void | SetTensorsData (TF_Tensor *tensor, const void *data, std::size_t len) |
template<typename T > | |
void | SetTensorsData (TF_Tensor *tensor, const std::vector< T > &data) |
template<typename T > | |
std::vector< T > | GetTensorsData (const TF_Tensor *tensor) |
template<typename T > | |
std::vector< std::vector< T > > | GetTensorsData (const std::vector< TF_Tensor * > &tensors) |
|
static |
Definition at line 97 of file tf_utils.C.
Referenced by ReadBufferFromFile().
|
static |
Definition at line 102 of file tf_utils.C.
References DeallocateBuffer().
Referenced by LoadGraph().
TF_Graph * LoadGraph | ( | const char * | graphPath | ) |
Definition at line 132 of file tf_utils.C.
References ReadBufferFromFile().
void DeleteSession | ( | TF_Session * | session | ) |
Definition at line 171 of file tf_utils.C.
TF_Tensor * CreateTensor | ( | TF_DataType | data_type, |
const std::int64_t * | dims, | ||
std::size_t | num_dims, | ||
const void * | data, | ||
std::size_t | len | ||
) |
Definition at line 255 of file tf_utils.C.
Referenced by CreateTensor().
void DeleteTensor | ( | TF_Tensor * | tensor | ) |
Definition at line 299 of file tf_utils.C.
void tf_utils::DeleteGraph | ( | TF_Graph * | graph | ) |
TF_Session* tf_utils::CreateSession | ( | TF_Graph * | graph | ) |
TF_Code tf_utils::RunSession | ( | TF_Session * | session, |
const TF_Output * | inputs, | ||
TF_Tensor *const * | input_tensors, | ||
std::size_t | ninputs, | ||
const TF_Output * | outputs, | ||
TF_Tensor ** | output_tensors, | ||
std::size_t | noutputs | ||
) |
TF_Code tf_utils::RunSession | ( | TF_Session * | session, |
const std::vector< TF_Output > & | inputs, | ||
const std::vector< TF_Tensor * > & | input_tensors, | ||
const std::vector< TF_Output > & | outputs, | ||
std::vector< TF_Tensor * > & | output_tensors | ||
) |
TF_Tensor* tf_utils::CreateTensor | ( | TF_DataType | data_type, |
const std::vector< std::int64_t > & | dims, | ||
const std::vector< T > & | data | ||
) |
Definition at line 75 of file tf_utils.H.
References CreateTensor(), and T.
TF_Tensor* tf_utils::CreateEmptyTensor | ( | TF_DataType | data_type, |
const std::int64_t * | dims, | ||
std::size_t | num_dims | ||
) |
TF_Tensor* tf_utils::CreateEmptyTensor | ( | TF_DataType | data_type, |
const std::vector< std::int64_t > & | dims | ||
) |
void tf_utils::DeleteTensors | ( | const std::vector< TF_Tensor * > & | tensors | ) |
void tf_utils::SetTensorsData | ( | TF_Tensor * | tensor, |
const void * | data, | ||
std::size_t | len | ||
) |
void tf_utils::SetTensorsData | ( | TF_Tensor * | tensor, |
const std::vector< T > & | data | ||
) |
Definition at line 95 of file tf_utils.H.
References SetTensorsData(), and T.
std::vector<T> tf_utils::GetTensorsData | ( | const TF_Tensor * | tensor | ) |
Definition at line 101 of file tf_utils.H.
References T.
std::vector<std::vector<T> > tf_utils::GetTensorsData | ( | const std::vector< TF_Tensor * > & | tensors | ) |
Definition at line 113 of file tf_utils.H.