Class TFJ_GradFuncAdapter
java.lang.Object
org.bytedeco.javacpp.Pointer
org.bytedeco.javacpp.FunctionPointer
org.tensorflow.internal.c_api.TFJ_GradFuncAdapter
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AbstractGradientAdapter
Function to be implemented on the JVM side to be called back by the native library when it is time to attach gradient operations for the given op, graph and scope.
grad_inputs are the inputs available to the gradient operations. grad_outputs must received the address of an array of TF_Output allocated by the JVM, which
represents the outputs of the gradient operations to attach to the graph. It is important to guarantee that the JVM won't try to trigger the deallocation
of that pointer, since the native code will take care of that when it won't need the array anymore.
Returns the number of elements pointed by grad_outputs.-
Nested Class Summary
Nested classes/interfaces inherited from class Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPointer cast constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcall(TFJ_GraphId graphId, TFJ_Scope scope, TF_Operation operation, TF_Output grad_inputs, int grad_inputs_length, PointerPointer grad_outputs) Methods inherited from class Pointer
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
-
Constructor Details
-
TFJ_GradFuncAdapter
Pointer cast constructor. InvokesPointer(Pointer). -
TFJ_GradFuncAdapter
protected TFJ_GradFuncAdapter()
-
-
Method Details
-
call
public int call(TFJ_GraphId graphId, TFJ_Scope scope, TF_Operation operation, TF_Output grad_inputs, int grad_inputs_length, @Cast("TF_Output**") PointerPointer grad_outputs)
-