TF_SessionRun()各参数

如何使用Tensorflow C-API保存Tensorflow模型

C api中的所有操作都通过TF_SessionRun()函数执行。 此函数有12个参数:

TF_CAPI_EXPORT extern void TF_SessionRun(
  TF_Session *session,            // Pointer to a TF session
  const TF_Buffer *run_options,   // No clue what this does
  const TF_Output *inputs,        // Your model inputs (not the actual input data)
  TF_Tensor* const* input_values, // Your input tensors (the actual data)
  int ninputs,                    // Number of inputs for a given operation (operations will be clear in a bit)
  const TF_Output* outputs,       // Your model outputs (not the actual output data)
  TF_Tensor** output_values,      // Your output tensors (the actual data)
  int noutputs,                   // Number of outputs for a given operation

  const TF_Operation* const* target_opers, // Your model operation (the actual computation to be performed for example training(fitting), computing metric, saving)
  int ntargets,                            // Number of targets (in case of multi output models for example)
  TF_Buffer* run_metadata,        // Absolutely no clue what this is
  TF_Status*);                    // Model status for when all fails with some cryptic error no one will help you debug

你可能感兴趣的:(c语言,c++)