Renaming some of the experimental SavedModel API function names.

PiperOrigin-RevId: 307473997
Change-Id: Ia0ca1da05aeaf64ddbbc752d6fb4bd5d55177c5d
This commit is contained in:
Brian Zhao 2020-04-20 14:14:10 -07:00 committed by TensorFlower Gardener
parent f65a9acfda
commit a29adb7b49
6 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ limitations under the License.
namespace tensorflow { namespace tensorflow {
const std::vector<tensorflow::AbstractTensorHandleInterface*>& const std::vector<tensorflow::AbstractTensorHandleInterface*>&
ConcreteFunction::Captures() const { ConcreteFunction::GetCaptures() const {
return captures_; return captures_;
} }

View File

@ -38,9 +38,9 @@ class ConcreteFunction {
virtual ~ConcreteFunction() = 0; virtual ~ConcreteFunction() = 0;
// This method returns the "Call" Op used to execute the function. // This method returns the "Call" Op used to execute the function.
virtual AbstractOperationInterface* GetFunctionOp() = 0; virtual AbstractOperationInterface* GetCallOp() = 0;
const std::vector<tensorflow::AbstractTensorHandleInterface*>& Captures() const std::vector<tensorflow::AbstractTensorHandleInterface*>& GetCaptures()
const; const;
const FunctionMetadata& GetFunctionMetadata() const; const FunctionMetadata& GetFunctionMetadata() const;

View File

@ -33,8 +33,8 @@ TF_OutputList* TF_ConcreteFunctionGetCaptures(TF_ConcreteFunction* func) {
return nullptr; return nullptr;
} }
TFE_Op* TF_ConcreteFunctionGetOperation(TF_ConcreteFunction* func) { TFE_Op* TF_ConcreteFunctionGetCallOp(TF_ConcreteFunction* func) {
return new TFE_Op{tensorflow::unwrap(func)->GetFunctionOp()}; return new TFE_Op{tensorflow::unwrap(func)->GetCallOp()};
} }
} // end extern "C" } // end extern "C"

View File

@ -35,9 +35,9 @@ TF_SavedModel* TF_LoadSavedModel(const char* dirname, TFE_Context* ctx,
void TF_DeleteSavedModel(TF_SavedModel* model) { delete model; } void TF_DeleteSavedModel(TF_SavedModel* model) { delete model; }
TF_ConcreteFunction* TF_GetSavedModelFunction(TF_SavedModel* model, TF_ConcreteFunction* TF_GetSavedModelConcreteFunction(TF_SavedModel* model,
char* function_path, char* function_path,
TF_Status* status) { TF_Status* status) {
tensorflow::ConcreteFunction* result = nullptr; tensorflow::ConcreteFunction* result = nullptr;
tensorflow::Status get_function_status = tensorflow::Status get_function_status =
model->saved_model->GetFunction(function_path, &result); model->saved_model->GetFunction(function_path, &result);

View File

@ -40,7 +40,7 @@ TF_CAPI_EXPORT extern TF_OutputList* TF_ConcreteFunctionGetCaptures(
TF_ConcreteFunction* func); TF_ConcreteFunction* func);
// Returns a TFE_Op suitable for executing this function. // Returns a TFE_Op suitable for executing this function.
TF_CAPI_EXPORT extern TFE_Op* TF_ConcreteFunctionGetOperation( TF_CAPI_EXPORT extern TFE_Op* TF_ConcreteFunctionGetCallOp(
TF_ConcreteFunction* func); TF_ConcreteFunction* func);
// Deletes `func`. // Deletes `func`.

View File

@ -67,7 +67,7 @@ TF_CAPI_EXPORT extern void TF_DeleteSavedModel(TF_SavedModel* model);
// TF_ConcreteFunction instance. The lifetime of this instance is // TF_ConcreteFunction instance. The lifetime of this instance is
// "conceptually" bound to `model`. Once `model` is deleted, all // "conceptually" bound to `model`. Once `model` is deleted, all
// `TF_ConcreteFunctions` retrieved from it are invalid, and have been deleted. // `TF_ConcreteFunctions` retrieved from it are invalid, and have been deleted.
TF_CAPI_EXPORT extern TF_ConcreteFunction* TF_GetSavedModelFunction( TF_CAPI_EXPORT extern TF_ConcreteFunction* TF_GetSavedModelConcreteFunction(
TF_SavedModel* model, char* function_path, TF_Status* status); TF_SavedModel* model, char* function_path, TF_Status* status);
// Retrieve a function from the TF SavedModel via a SignatureDef key. // Retrieve a function from the TF SavedModel via a SignatureDef key.