AI-TensorFlow-Libtensorflow
view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_ImportGraphDefResults*
TF_GraphImportGraphDefWithResults(TF_Graph* graph, const TF_Buffer* graph_def,
const TF_ImportGraphDefOptions* options,
TF_Status* status);
=head2 TF_GraphImportGraphDefWithReturnOutputs
=over 2
Import the graph serialized in `graph_def` into `graph`.
Convenience function for when only return outputs are needed.
`num_return_outputs` must be the number of return outputs added (i.e. the
result of TF_ImportGraphDefOptionsNumReturnOutputs()). If
`num_return_outputs` is non-zero, `return_outputs` must be of length
`num_return_outputs`. Otherwise it can be null.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_GraphImportGraphDefWithReturnOutputs(
TF_Graph* graph, const TF_Buffer* graph_def,
const TF_ImportGraphDefOptions* options, TF_Output* return_outputs,
int num_return_outputs, TF_Status* status);
=head2 TF_GraphImportGraphDef
=over 2
Import the graph serialized in `graph_def` into `graph`.
Convenience function for when no results are needed.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_GraphImportGraphDef(
TF_Graph* graph, const TF_Buffer* graph_def,
const TF_ImportGraphDefOptions* options, TF_Status* status);
=head2 TF_GraphCopyFunction
=over 2
Adds a copy of function `func` and optionally its gradient function `grad`
to `g`. Once `func`/`grad` is added to `g`, it can be called by creating
an operation using the function's name.
Any changes to `func`/`grad` (including deleting it) done after this method
returns, won't affect the copy of `func`/`grad` in `g`.
If `func` or `grad` are already in `g`, TF_GraphCopyFunction has no
effect on them, but can establish the function->gradient relationship
between them if `func` does not already have a gradient. If `func` already
has a gradient different from `grad`, an error is returned.
`func` must not be null.
If `grad` is null and `func` is not in `g`, `func` is added without a
gradient.
If `grad` is null and `func` is in `g`, TF_GraphCopyFunction is a noop.
`grad` must have appropriate signature as described in the doc of
GradientDef in tensorflow/core/framework/function.proto.
If successful, status is set to OK and `func` and `grad` are added to `g`.
Otherwise, status is set to the encountered error and `g` is unmodified.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_GraphCopyFunction(TF_Graph* g,
const TF_Function* func,
const TF_Function* grad,
TF_Status* status);
=head2 TF_GraphNumFunctions
=over 2
Returns the number of TF_Functions registered in `g`.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern int TF_GraphNumFunctions(TF_Graph* g);
=head2 TF_GraphGetFunctions
=over 2
Fills in `funcs` with the TF_Function* registered in `g`.
`funcs` must point to an array of TF_Function* of length at least
`max_func`. In usual usage, max_func should be set to the result of
TF_GraphNumFunctions(g). In this case, all the functions registered in
`g` will be returned. Else, an unspecified subset.
If successful, returns the number of TF_Function* successfully set in
`funcs` and sets status to OK. The caller takes ownership of
all the returned TF_Functions. They must be deleted with TF_DeleteFunction.
On error, returns 0, sets status to the encountered error, and the contents
of funcs will be undefined.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern int TF_GraphGetFunctions(TF_Graph* g, TF_Function** funcs,
int max_func, TF_Status* status);
=head2 TF_OperationToNodeDef
=over 2
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_OperationToNodeDef(TF_Operation* oper,
TF_Buffer* output_node_def,
TF_Status* status);
=head2 TF_NewWhile
=over 2
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
On failure, place an error status in status and return NULL.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Library* TF_LoadLibrary(const char* library_filename,
TF_Status* status);
=head2 TF_GetOpList
=over 2
Get the OpList of OpDefs defined in the library pointed by lib_handle.
Returns a TF_Buffer. The memory pointed to by the result is owned by
lib_handle. The data in the buffer will be the serialized OpList proto for
ops defined in the library.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Buffer TF_GetOpList(TF_Library* lib_handle);
=head2 TF_DeleteLibraryHandle
=over 2
Frees the memory associated with the library handle.
Does NOT unload the library.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_DeleteLibraryHandle(TF_Library* lib_handle);
=head2 TF_GetAllOpList
=over 2
Get the OpList of all OpDefs defined in this address space.
Returns a TF_Buffer, ownership of which is transferred to the caller
(and can be freed using TF_DeleteBuffer).
The data in the buffer will be the serialized OpList proto for ops registered
in this address space.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_GetAllOpList(void);
=head2 TF_NewApiDefMap
=over 2
Creates a new TF_ApiDefMap instance.
Params:
op_list_buffer - TF_Buffer instance containing serialized OpList
protocol buffer. (See
https://www.tensorflow.org/code/tensorflow/core/framework/op_def.proto
for the OpList proto definition).
status - Set to OK on success and an appropriate error on failure.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_ApiDefMap* TF_NewApiDefMap(TF_Buffer* op_list_buffer,
TF_Status* status);
=head2 TF_DeleteApiDefMap
=over 2
Deallocates a TF_ApiDefMap.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_DeleteApiDefMap(TF_ApiDefMap* apimap);
=head2 TF_ApiDefMapPut
=over 2
Add ApiDefs to the map.
`text` corresponds to a text representation of an ApiDefs protocol message.
(https://www.tensorflow.org/code/tensorflow/core/framework/api_def.proto).
The provided ApiDefs will be merged with existing ones in the map, with
precedence given to the newly added version in case of conflicts with
previous calls to TF_ApiDefMapPut.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern void TF_ApiDefMapPut(TF_ApiDefMap* api_def_map,
const char* text, size_t text_len,
TF_Status* status);
=head2 TF_ApiDefMapGet
=over 2
Returns a serialized ApiDef protocol buffer for the TensorFlow operation
named `name`.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_ApiDefMapGet(TF_ApiDefMap* api_def_map,
const char* name,
size_t name_len,
TF_Status* status);
=head2 TF_GetAllRegisteredKernels
=over 2
Returns a serialized KernelList protocol buffer containing KernelDefs for all
registered kernels.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_GetAllRegisteredKernels(TF_Status* status);
=head2 TF_GetRegisteredKernelsForOp
=over 2
Returns a serialized KernelList protocol buffer containing KernelDefs for all
kernels registered for the operation named `name`.
=back
/* From <tensorflow/c/c_api.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_GetRegisteredKernelsForOp(
const char* name, TF_Status* status);
=head2 TF_UpdateEdge
=over 2
Update edge, switch input/ output in a node
=back
lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod view on Meta::CPAN
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern TF_DataType TF_ExpectedOutputDataType(
TF_OpKernelContext* ctx, int i);
=head2 TF_IsHostMemoryInput
=over 2
Returns true if the ith input is allocated in host memory. If i < 0 or i >=
TF_NumInputs(ctx), the program aborts.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern bool TF_IsHostMemoryInput(TF_OpKernelContext* ctx, int i,
TF_Status* status);
=head2 TF_IsHostMemoryOutput
=over 2
Returns true if the ith output is allocated in host memory. If i < 0 or i >=
TF_NumOutputs(ctx), the program aborts.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern bool TF_IsHostMemoryOutput(TF_OpKernelContext* ctx, int i,
TF_Status* status);
=head2 TF_StepId
=over 2
Returns the step ID of the given context.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern int64_t TF_StepId(TF_OpKernelContext* ctx);
=head2 TF_OpKernelConstruction_GetNodeDef
=over 2
Returns the serialized NodeDef protocol buffer for the kernel
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern TF_Buffer* TF_OpKernelConstruction_GetNodeDef(
TF_OpKernelConstruction* ctx, TF_Status* status);
=head2 TF_GetFrameId
=over 2
Returns the frame ID of the given context.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern uint64_t TF_GetFrameId(TF_OpKernelContext* ctx);
=head2 TF_GetIterId
=over 2
Returns the Iter ID of the given context.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern int64_t TF_GetIterId(TF_OpKernelContext* ctx);
=head2 TF_GetGraphDefVersion
=over 2
Returns the graph def version of the given context.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern int TF_GetGraphDefVersion(TF_OpKernelContext* ctx);
=head2 TF_GetOpKernelName
=over 2
Returns the name of the OpKernel.
The returned TF_StringView's underlying string is owned by the OpKernel and
has the same lifetime as the OpKernel.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern TF_StringView TF_GetOpKernelName(TF_OpKernelContext* ctx);
=head2 TF_GetResourceMgrDefaultContainerName
=over 2
Returns the default container of the resource manager in OpKernelContext.
The returned TF_StringView's underlying string is owned by the OpKernel and
has the same lifetime as the OpKernel.
=back
/* From <tensorflow/c/kernels.h> */
TF_CAPI_EXPORT extern TF_StringView TF_GetResourceMgrDefaultContainerName(
TF_OpKernelContext* ctx);
=head2 TF_GetOpKernelRequestedInput
=over 2
( run in 1.314 second using v1.01-cache-2.11-cpan-98d9bbf8dc8 )